From: Gary Coady (gary at domain netsoc.tcd.ie)
Date: Mon 03 Jun 2002 - 15:28:44 IST
On Sun, Jun 02, 2002 at 08:22:58PM +0100, Conor Daly wrote:
> 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 domain isp.net" to be delivered to
> "user at domain server.localdomain").
Okay, firstly I haven't had to do any of this before, but it might actually
be correct, and it should give you an idea of how to solve your problem :)
First of all, use in main.cf:
recipient_canonical_maps = pcre:/etc/postfix/recipient_map.pcre
# /etc/postfix/recipient_map.pcre
# Rewrite domain+user to user - I don't think the address is re-run
# through trivial-rewrite, so add the domain here.
/^mailaccount\+(.*) at domain / ${1} at domain server.localdomain
> I also want to rewrite outgoing mail from
> "user at domain server.localdomain" to "mailaccount+user at domain isp.net".
And here in main.cf:
sender_canonical_maps = pcre:/etc/postfix/sender_map.pcre
# /etc/postfix/sender_map.pcre
# Rewrite user at domain to mailaccount+user at domain isp.net
/^(.*) at domain / mailaccount+${1} at domain 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 domain clientxx.localdomain" is mapped to "mailaccount+user at domain isp.net" just
> as "user at domain server.localdomain" gets mapped to "mailaccount+user at domain isp.net").
I'm ignoring the domain name in the sender_map.pcre above so I think
this should just fall out.
> 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
According to local(8), it now supports Maildir for mail_spool_directory
when you specify the trailing slash (support was added in snapshot release
20010701).
Hope that helps :) Read up on canonical(5) in particular...
Gary.
This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:17:04 GMT