Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 14th December 2009, 15:02
vistree vistree is offline
Member
 
Join Date: Aug 2006
Posts: 61
Thanks: 2
Thanked 4 Times in 3 Posts
Default 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
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
Reply With Quote
Sponsored Links
  #2  
Old 14th December 2009, 16:52
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,015
Thanks: 840
Thanked 5,652 Times in 4,461 Posts
Default

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.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 14th December 2009, 17:09
vistree vistree is offline
Member
 
Join Date: Aug 2006
Posts: 61
Thanks: 2
Thanked 4 Times in 3 Posts
Default

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!!
Reply With Quote
  #4  
Old 14th December 2009, 17:17
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,015
Thanks: 840
Thanked 5,652 Times in 4,461 Posts
Default

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.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 14th December 2009, 17:42
vistree vistree is offline
Member
 
Join Date: Aug 2006
Posts: 61
Thanks: 2
Thanked 4 Times in 3 Posts
Default

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 testuser@testdomain.de ??
Of course, testdomain exists and all the textmails are well transported to the ispconfig-mailstore.
Reply With Quote
  #6  
Old 14th December 2009, 17:46
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,015
Thanks: 840
Thanked 5,652 Times in 4,461 Posts
Default

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".
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
vistree (14th December 2009)
  #7  
Old 14th December 2009, 17:51
vistree vistree is offline
Member
 
Join Date: Aug 2006
Posts: 61
Thanks: 2
Thanked 4 Times in 3 Posts
Default Solved

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

Kind regards

Kai
Reply With Quote
  #8  
Old 14th December 2009, 18:58
vistree vistree is offline
Member
 
Join Date: Aug 2006
Posts: 61
Thanks: 2
Thanked 4 Times in 3 Posts
Default

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" ==
Reply With Quote
  #9  
Old 15th December 2009, 09:20
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,015
Thanks: 840
Thanked 5,652 Times in 4,461 Posts
Default

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
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #10  
Old 15th December 2009, 10:50
vistree vistree is offline
Member
 
Join Date: Aug 2006
Posts: 61
Thanks: 2
Thanked 4 Times in 3 Posts
 
Default

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
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR- Connection dropped by imap-server Al1937 Installation/Configuration 10 4th September 2009 22:15
Problem with mail and plugin djmostek Installation/Configuration 10 3rd September 2007 22:12
saslauthd problem: bind: Address already in use fitti70 Server Operation 4 14th May 2007 22:51
postfix mysql on fedora core5 igongora Installation/Configuration 7 17th April 2007 05:40
Postfix+MySQL Problem jasutton Installation/Configuration 1 15th June 2006 17:06


All times are GMT +2. The time now is 22:59.


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