Well, I'm fighting with it.
setup I have is a dialup internet account with a single email address. I
want to use that email address with "+" extensions to provide mail for
multiple users (eg. "mailaccount+user at isp.net" to be delivered to
"user at server.localdomain"). I also want to rewrite outgoing mail from
"user at server.localdomain" to "mailaccount+user at isp.net".
Not asking too much so far eh? Well, I've got another desire. I want to
have mail from _all_ hosts within the domain (which is, of course, a
fictional domain) rewritten to the "isp.net" domain (ie.
"user at clientxx.localdomain" is mapped to "mailaccount+user at isp.net" just
as "user at server.localdomain" gets mapped to "mailaccount+user at isp.net").
The "clientxx" hosts are all using NIS and NFS for the users so
"user at server" is the same as "user at clientxx" and "user at clientyy". It
seems easier to have the clients use local MUAs and an NFS mounted
mailspool and $HOME rather than having them ssh to the server to do their
emailing but it requires a bit more config in the setup.
I could use the aliases file to map each individual user to and fro but
since I won't be the admin for the box and the admin won't be too savvy, I
would prefer to use some sort of generic configuration to handle
everything (ie. if a user exists on the server, mail to
"mailaccount+user at isp.net" will be delivered to "user at server.localdomain")
So far, using postfix, I have "user at server.localdomain" being mapped to
"user at isp.net" but "user at clientxx.localdomain" still goes out as
"user at clientxx.localdomain" even though clientxx (using sendmail) has, and
uses, "server.localdomain" as its smarthost.
Any ideas anyone?
So far, I've set the following...
mydomain=localdomain
myorigin=isp.net
mydestination = $myhostname, localhost.$mydomain, $mydomain
relay_domains = $mydestination
relayhost=mail.isp.net
recipient_delimiter = +
mailbox_command = /usr/bin/procmail -a "$EXTENSION"
I want to use Maildir mailboxes (for sharing with NFS) but I'm not sure if
I can specify "/var/spool/mail/" as mail_spool_directory to force Maildir
use.
#home_mailbox = Maildir/
mail_spool_directory = /var/spool/mail
Maybe I can use
mailbox_command = /usr/bin/procmail -a "$EXTENSION"
to route "mailaccount+user at isp.net" to /var/spool/mail/$EXTENSION/ where
$EXTENSION is "user"
Conor (confused)
--
Conor Daly <conor.daly at oceanfree.net>
Domestic Sysadmin :-)
---------------------
Faenor.cod.ie
7:46pm up 10 days, 5:04, 0 users, load average: 0.00, 0.00, 0.00
Hobbiton.cod.ie
7:47pm up 10 days, 5:08, 1 user, load average: 0.19, 0.05, 0.01
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!