View Single Post
  #7  
Old 23rd April 2006, 14:58
todgerme todgerme is offline
Member
 
Join Date: Dec 2005
Location: Belfast, Northern Ireland
Posts: 54
Thanks: 0
Thanked 1 Time in 1 Post
Default

i suspect the way around this problem is to pass the particular domain through a different MDA. I'm not sure if Postfix even looks at .forward files when using Virtual Users so I'm not convinced you can call Procmail with a .forward file.
I have repeatedly tried to get .forward files working but no look yet with Virtual users:
A quick show of the Postfix defaults shows:
# postconf -d | grep .forward
forward_path = $home/.forward${recipient_delimiter}${extension}, $home/.forward
I have tried specifying all sorts in the forward but it just seems to ignore whatever I do.

Also I have read in a few places that the Procmail command only works for local users and not Virtual Users so I'n not convinced a Global procmail script will work although never say never.

So two ways forward I can see:

The Postfix conf shows virtual_transport = virtual, we could change this maildrop or procmail, however that will mean all mail will be delivered using these agents and maildrop for example can't make its own directories the way the Postfix virtual agent does so it's probably best to leave this as is.

So like the way you can pass mail off to Yaa to get an autoresponders through the transport layer, I would suggest the same but passing it off to Maildrop/Procmail. Obviously a Procmail entry would need to be made in the master.cf file but there should already be an entry for maildrop. In addition you'll need to create a maildroprc file in /etc to reflect users directories and tell it to check for maildroprc files in the various home directories but I don't think that should be a big issue. One further idea would be to try and enable Mysql Virtual users in the maildrop source for Debian, a simply configure switch can have Maildrop looking at the database. From there, the exisiting guide will need to be modded so that it gets its maildir information from the database and not from concats of the email address on top of the vmail home directory

master.cf should look like this
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr /bin/maildrop -d ${recipient}

then you should have something like

domain.com -> maildrop in your transport MySQL tables.

Ignoring most of this punters guide:

http://www.marlow.dk/site.php/tech/postfix

look at the maildrop bit, he includes a maildrop script that would be perfect for creating the directories with maildirmake, and allowing for per domain maildrop scripts.

So a little work required but not impossible! Hope it helps
Reply With Quote