HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (
-   Installation/Configuration (
-   -   problem with additional mailbox_transport for groupware (

vistree 14th December 2009 15:02

problem with additional mailbox_transport for groupware
Hi, I hope you can help ...

I set up ispconfig 3 - and it is working great!!!
I have just one litte problem I spent now hours to solve: I have to transport mails to an additional service on the server.
OK, in detail:
I have set up a lot of domains and mailboxes.
For one domain, I want to deliver mails not only to the Maildir-folger (/var/vmail/domainx.tld/userX ). Instead I want to sent it also to an extra service on the server. I use a groupware which wants to store all mails inside its own database.
So I tried a lot of modifications for postfix:
All edits are ADDITIONAL to the original ones from isp3 --> at the end

mailbox_transport = groupware:
groupware_destination_recipient_limit = 1 --> at the end

groupware  unix  -      n      n      -      10      pipe
  flags= user=vmail argv=/usr/bin/groupware-deliverprog ${recipient}

I tried also with ${user} and ${original_recipient}

But I can't even find an log entry in mail.log or the groupwares log. It seems, that postfix does not execute the command??

If I start the groupware-deliverprog from shell, everything works fine.

Any hints for me? Thank you

till 14th December 2009 16:52

The postfix mailsystem used by ispconfig is based on virtual domains, so the transpport for virtual delivery is defined by virtual_transport and not mailbox_transport. But if you set virtual_transport to groupware, you will disable the delivery trogh ispconfig.

If you want to use ispconfig plus your groupware, you should conīsider if its better to add some additional maildelivery rules to the /var/vmail/.mailfilter file. This is the global mailfilter file called for all mail deliveries and it should be possible to send all emails as copy to your groupware-deliverprog. The syntax of this file is "maildrop" syntax.

vistree 14th December 2009 17:09

Hi Till,
thank you for the quick reply.
Can I ask some point?

So if I edit /var/vmail/.mailfilter , will this stay after updating ispconfig?

For the parameters inside, as I am just a very basic coder ;-), do I understand correct:
$RECIPIENT contains the full email-address of the main mailbox??

Is the following syntax correct, whe I want to add a rule only for one specific domain?


if ("$HOST" == "")
  /usr/bin/mailtogroupwarescript ($RECIPIENT)

Kind regards an a nice day!!

till 14th December 2009 17:17

I guess you will have tio use this:


if ("$HOST" == "")
  `/usr/bin/mailtogroupwarescript $RECIPIENT`

The .mailfilter file will get overwritten on updates, so you should make a backup of your changed file.

vistree 14th December 2009 17:42

Hi Till,
thank you again!

For a quick tryout I just puttet the following in the .mailfilter, right at the end of the file:

if ("$HOST" == "")
  `/bin/echo $RECIPIENT >> /tmp/ticker.txt`

The file /tmp/ticker.txt exist and is 777, owner is root.

Nothing happens (also, if I try to echo a string like test).
But maybe I misunderstood something ....

Shall this has to work for an incoming mail for ??
Of course, testdomain exists and all the textmails are well transported to the ispconfig-mailstore.

till 14th December 2009 17:46

Maybe you added the lines at the wrong part of the file. Be aware that they will never get executed if you add them at the end as the delivery is finished then already. E.g. try to add them right after the command for "# Create a mailsize file".

vistree 14th December 2009 17:51

Hi Till, Thank you. This way it works!!

Kind regards


vistree 14th December 2009 18:58

Sorry, still one little thing:
He tries to do the command for alle $HOST.
Is it correct, that $HOST is the domain part of the email-receiver?? Or is Host something with the mailserver?
Or may I use the

if ($HOST =
instead of

if ("HOST" ==

till 15th December 2009 09:20

You can check the actual content of the variables for a given mail delivery on your system e.g. with:

`/bin/echo $HOST >> /tmp/test.txt`

in the .mailfilter file

vistree 15th December 2009 10:50

Hi Till,
yes, this is what I did. I puttet
`/bin/echo $HOST >> /tmp/ticker.txt` inside the if-condition.

And he puts a line for each incoming email in the /tmp/ticker.txt - this is the reason I asked, if there is something wrong ...

I don't understand, why the rule adds the email-domain for each incoming email to the txt-file. Any thoughts on this behavior? Is the "==" wrong?

Kind regards


All times are GMT +2. The time now is 12:05.

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