[Dovecot] Sendmail + Deliver for virtual domains via /etc/procmailrcs scripts
Natan Vermeersch
natanver at hotmail.com
Sun Jun 14 18:31:53 EEST 2009
Is there also a recipe for delivery to virtual dovecot domains via "deliver" ?
what I would like to achieve:
user1 at example.net -> forwarded to user1 at hotmail.com
user2 at 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 at dovecot.org
> From: andrzej.filip at gmail.com
> Date: Thu, 11 Jun 2009 19:36:33 +0200
> CC: natanver at hotmail.com
> Subject: Re: [Dovecot] Sendmail + Deliver for virtual domains via /etc/procmailrcs scripts
>
> Recipe for delivery to virtual dovecot domains via procmail scripts
>
> 1) 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
>
> 2) 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
>
> 3) access (database/file) lines [recompile it with makemap program]
>
> # accept messages addressesed to example.net from anywhere
> to:example.net RELAY
>
> 4) /etc/mail/virtual-domains file
>
> example.net
>
> 5) 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 at example.net %0
> user2 at example.net %0
> @example.net error:nouser User Unknown
>
> --
> [pl>en: Andrew] Andrzej Adam Filip : anfi at 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
More information about the dovecot
mailing list