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 main.cf --> at the end Code: mailbox_transport = groupware: groupware_destination_recipient_limit = 1 master.cf --> at the end Code: 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
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.
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? Code: if ("$HOST" == "myspecialdomain.de") { /usr/bin/mailtogroupwarescript ($RECIPIENT) } Kind regards an a nice day!!
I guess you will have tio use this: Code: if ("$HOST" == "myspecialdomain.de") { `/usr/bin/mailtogroupwarescript $RECIPIENT` } The .mailfilter file will get overwritten on updates, so you should make a backup of your changed file.
Hi Till, thank you again! For a quick tryout I just puttet the following in the .mailfilter, right at the end of the file: Code: if ("$HOST" == "testdomain.de") { `/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 [email protected] ?? Of course, testdomain exists and all the textmails are well transported to the ispconfig-mailstore.
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".
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 Code: if ($HOST = instead of Code: if ("HOST" ==
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
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 Kai
Solved OK, I find the problem: instead of using "==" I use "eq" - this way only the wished domain is used. Kind regards