LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] I thought you didn't have to fight postfix...

[ILUG] I thought you didn't have to fight postfix...

Gary Coady gary at netsoc.tcd.ie
Mon Jun 3 15:28:44 IST 2002


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 isp.net"  to be delivered to
> "user at 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\+(.*)@/	${1}@server.localdomain


> I also want to rewrite outgoing mail from
> "user at server.localdomain" to "mailaccount+user at isp.net".  

And here in main.cf:
sender_canonical_maps = pcre:/etc/postfix/sender_map.pcre

# /etc/postfix/sender_map.pcre
# Rewrite user@ to mailaccount+user at isp.net
/^(.*)@/	mailaccount+${1}@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").

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.




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


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!
RSS Version
Powered by Dell