HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (
-   HOWTO-Related Questions (
-   -   Vacation/Autoreply plugin question using Virtual Users And Domains with Postfix (

triak 18th May 2006 23:27

Vacation/Autoreply plugin question using Virtual Users And Domains with Postfix
Hi, I'm a bit stuck here.
I have put up a production mailsystem, and now I need to implement a Vacation/Autoreply feature.
The setup is created from Falco's exellent how-to: "Virtual Users And Domains With Postfix , Courier And MySQL (+ SMTP-AUTH, Quota, SpamAssassin, ClamAV)", with the difference of sql-server running on a another host.

I have setup Squirrelmail for webmail access and it works like a charm.Squirrelmail has a plugin called "Courier Vacation" that creates text files containing information like away-message, cc-address etc. in the virtual users Maildir directory.
There's a maildroprc file that test's the existence of theese files and accts accordingly. Mail is either autoreplyed or not, kept fowarded to local mailbox or deleted.

My humble question is: How can I pipe the mails trough maildrop after they have been scaned for viruses etc. What entryes to
I figure Falco's setup uses procmail for final delivery, can i configure maildrop to do the same thing with this extra funcionality?

TIA: Johannes Kullberg - TMI TRIAK

A link to the plugin:

falko 19th May 2006 16:24

I don't know if this works, but you can get an autoresponder by installing sqwebmail:

triak 20th May 2006 10:33

Yes but...
We have allready many customers using the Squirrelmail package. It's not an option to start using some other webmail. I really need to get this one working with the maildrop script. Falco, does procmail do the final delivery to the mailbox? Could it be possible to have it done by maildrop?
The problem with this one is that the system is in production and I can't go the "trial & error" way. I need a solution that works out of the box :=)


todgerme 21st May 2006 14:12

you have two options:

forget procmail!

a) follow the maildrop filering guide and implement an autoresponder by piping the mail from maildrop .mailfilter file or

b) take a look at Yaa (

I have plans to cover these very soon and write a guide for autoresponders so if you can sit tight, i'll try and get something up asap for you.

triak 5th June 2006 20:35

Vacation using maildrop allmoast working....
2 Attachment(s)
The Squirrelmail courier-vacation plugin works and a global maildroprc instructs maildrop to read the users vacation directory for vacation messages. The "forward" and "keep messages" functions are working. BUT! the autoreply itself to the sender is not working for some strange reason. I suspect it has someting to do with maildrop marco's. The orginal from address disappears. Heres a clip from the mail log:

Jun 5 20:01:59 localhost postfix/qmgr[21568]: 486EBF0113: from=<>, size=1246, nrcpt=1 (queue active)
Jun 5 20:01:59 localhost amavis[20433]: (20433-08) Passed, \n<> -> <>, Message-ID: <> , Hits: -1.826

Jun 5 20:01:59 localhost postfix/pickup[21567]: 62907F0116: uid=5000 from=<>
Jun 5 20:01:59 localhost postfix/cleanup[22065]: 62907F0116: message-id=<>
Jun 5 20:01:59 localhost postfix/pipe[22082]: 486EBF0113: to=<>, relay=maildrop, delay=0, status=sent (
Jun 5 20:01:59 localhost postfix/cleanup[22065]: 62907F0116: to=<unknown>, relay=none, delay=0, status=bounced (No recipients specified)

Postfix is trying to send the replymail, but does not know the recipient.
The problem is obvious, but how can I fix this so that the correct string is passed back to postfix?
I will attach my maildroprc and configuration files.
The maildrop filtering is added to Falco's virtual system using this howto:

The holidays here in Finland are just starting and I'm in a bit of trouble here...
Plz help a bit :=)

triak 7th June 2006 09:25

Nobody knows the answer?
I have been searching maildrop and postfix documents, googling my ass off,
asking friends etc. ... Does anybody know how to deal with this problem. My customer's are starting to get stressed, and I really need to get this vacation thing working.....
TIA: Johannes

falko 7th June 2006 14:23

It seems as if the recipient is not set correctly in


maildrop  unix  -      n      n      -      -      pipe
  flags=DRhu user=vmail argv=/usr/local/maildrop/bin/maildrop -d ${user}@${nexthop} ${extension} ${recipient} ${user} ${nexthop} ${sender}

in What happens if you replace ${recipient} with a hard-coded email address (e.g. yours) for testing purposes? Do you receive the autoreply emails then?

triak 7th June 2006 15:15

Nope, does not help
Changing the recipient macro does not affect anyting.
The log is exactly the same and no autoreply address is beeing delivered to cleanup daemon.
How is the macro's forwarded to maildrop? $1 $2 $3 etc. Maybe the numbers are getting mixed up....

falko 7th June 2006 15:52

Did you restart Postfix?
What's in now?

triak 7th June 2006 16:37

Tried both reload and restart
Now I have the following string:

maildrop unix - n n - - pipe
flags=hu user=vmail argv=/usr/local/maildrop/bin/maildrop -d ${user}@${nexthop} ${extension} ${user} ${nexthop} ${sender}

$1 is ${user}@${nexthop}
$2 is ${extension}

Is this the way macros get distributed to maildrop?

All times are GMT +2. The time now is 18:51.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.