Is there also a recipe for delivery to virtual dovecot domains via "deliver" ?
what I would like to achieve:
user1@example.net -> forwarded to user1@hotmail.com
user2@example.net -> delivered to local mailbox (a virtual dovecot mailbox)
for the first one you need FEATURE(`virtusertable')
for the second one you need FEATURE(`mailertable')
To: dovecot@dovecot.org From: andrzej.filip@gmail.com Date: Thu, 11 Jun 2009 19:36:33 +0200 CC: natanver@hotmail.com Subject: Re: [Dovecot] Sendmail + Deliver for virtual domains via /etc/procmailrcs scripts
Recipe for delivery to virtual dovecot domains via procmail scripts
- sendmail.mc lines [recompile it to sendmail.cf]
FEATURE(
mailertable') FEATURE(
virtusertable') MAILER(`procmail') LOCAL_CONFIG dnl File to keep non local domains processed via virtusertable F{VirtHost}/etc/mail/virtual-domains
- mailertable lines [recompile it with makemap program]
deliver messages to example.net domain via procmail script
# /etc/procmailrcs/example.net.rc # procmail treats scripts in /etc/procmailrcs in special way # if executed as root changes uid to uid of the script file owner example.net procmail:/etc/procmailrcs/example.net.rc
- access (database/file) lines [recompile it with makemap program]
accept messages addressesed to example.net from anywhere
to:example.net RELAY
- /etc/mail/virtual-domains file
example.net
- Check that example.net *IS NOT* listed on list on local email domains
echo '$=w' | sendmail -bt
If it is then 5a) disable auto-detection of local email domains http://www.sendmail.org/m4/tweaking_config.html#confDONT_PROBE_INTERFACES 5b) add local domains missing after turning off auto-detection manually [as mentioned in http://www.sendmail.org/faq/section4#4.5 ]
As I wrote it is a little bit messy and requires many different entries for single virtual domain but no patching of *.m4 files is required.
P.S. *IF* you add the line below to sendmail.mc define(`_VIRTUSER_STOP_ONE_LEVEL_RECURSION_') *THEN* you can list existing dovecot virtual users in virtusertable and reject remaining addresses
user1@example.net %0 user2@example.net %0 @example.net error:nouser User Unknown
-- [pl>en: Andrew] Andrzej Adam Filip : anfi@onet.eu You can't play your friends like marks, kid. -- Henry Gondorf, "The Sting"
Reageer op foto’s van je vrienden en bekijk hun reacties op de jouwe. Gegarandeerd hilariteit! http://www.microsoft.com/belux/nl/windows/windowslive/products/photos.aspx