[BUGS] Sendmail relaying based on recipient
John Marshall
john.marshall at riverwillow.com.au
Thu Feb 6 07:49:51 EST 2014
On Thu, 06 Feb 2014, 01:18 +1100, Jerahmy Pocott wrote:
> So for example bob at domain, joe at domain and fred at domain should be delivered to some
> local users while all other @domain should go to estmp:domain.relay.
The way I do this for foreign domains is with virtusertable. You need
to enable the features in your sendmail.mc file:
VIRTUSER_DOMAIN_FILE(`/etc/mail/virtuser-domains')
FEATURE(`virtusertable')
In the VIRTUSER_DOMAIN_FILE, list the domains (one per line) that you
want sendmail to check in the virtusertable; then use virtusertable to
point the particular foreign addresses at the required local address.
So, from your example, in virtuser-domains:
domain
and in virtusertable:
bob at domain %1
joe at domain harry
fred at domain harry
In this case, mail addressed to bob at domain would be delivered to the
local address bob; and mail addressed to either joe at domain or
fred at domain would be delivered to the local user harry: all other mail
for @domain would be relayed according to DNS MX for @domain unless you
override that in mailertables as you mentioned. Note that
virtuser-domains is not a map, so you would need to restart sendmail to
read any changes you make to that file.
See cf/README in the sendmail distribution for the official explanation.
--
John Marshall
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mailman.barnet.com.au/pipermail/bugs/attachments/20140206/3024e984/attachment.bin>
More information about the BUGS
mailing list