#1  
Old 14th May 2013, 12:25
poda3 poda3 is offline
Junior Member
 
Join Date: May 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Postfix

Hi,

let's say my domain is named "domain.tld" and the domain mails are hosted by a third party ISP so the MX record points to a ISP's public IP address.

I wanted to backup in a centralized place all the accounts incoming mails so I set an ISPConfig server in my office and configured on it the domain "domain.tld" and all the accounts also configured on the ISP mail server and then, I configured fetchmail to fetch periodically the incoming mail on the ISP accounts to te locals.

I also configured a special account where all the incoming mail are placed in by copy using the "always_bcc" postfix directive.



Now I want to use the ISPConfig server also as a SMTP Outgoing server for the clients inside my network.
To do that I provided the server with a public IP address and I configured the clients to use it.

The problem, of course, is that when a mail is sent from an internal account to another internal account, the ISPConfig server delivers it locally, without send it to the ISP, because the domain "domain.tld" is configured on ISPConfig.

I want to avoid this behavior and force postfix to send the mails to the public mx server, regardless of where the domain is hosted.

I tried to configure the domain itself inside the "mail routing" section, adding the domain as a new transport.
This actually works BUT it generates a mail loop to the ISP accounts:

The mail is sent to the ISP, then it is fetched by fetchmail and, once is fetched, it is automatically delivered again to the ISP, and so on for 5 or 6 times when the loop is blocked by the anti-loop system.

I then tried to add the lines:

-o virtual_mailbox_domains=
-o virtual_mailbox_maps=
-o relayhost=mx.mydomain.tld

to my master.cf file in the sections "smtp", "smtps" and "submission" but no luck.



Anyone can help me with this?

Thank you in advance.
Reply With Quote
Sponsored Links
  #2  
Old 15th May 2013, 10:42
tahunasky tahunasky is offline
Member
 
Join Date: Jul 2012
Location: Buenos Aires
Posts: 84
Thanks: 1
Thanked 8 Times in 8 Posts
Default

I understand what you want to do, but i cant understand why you want to do this ??

However why dont you just setup the email clients to use the IPS's smtp server, and by-pass your server altogether ?
Reply With Quote
  #3  
Old 15th May 2013, 11:02
poda3 poda3 is offline
Junior Member
 
Join Date: May 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

We are already using the ISP SMTP server.
We want to use our internal mailserver in order to backup the outgoing mails.

Fetchmail seems to fetch just the inbox directory.
Reply With Quote
  #4  
Old 15th May 2013, 11:58
tahunasky tahunasky is offline
Member
 
Join Date: Jul 2012
Location: Buenos Aires
Posts: 84
Thanks: 1
Thanked 8 Times in 8 Posts
Default

Fetchmail is only designed to fetch new emails, and new emails are sent to the INBOX.
All other mail boxes are used by the email client. eg: when you send an email from outlook, windows live mail, thunderbird or squirrelmail email clients, you tell the client in the configuration where to put sent/trash/draft etc.
This is either a local folder on the PC or an IMAP folder on the server. When sending an email the email client connects to the smtp server, sends the email, and then when it is sent puts the email in the correct folder - usually moving from outbox to sent folders.

So if it was me, i would use IMAP on your server for storing emails, and the ISP's smtp server for sending. I would use fetchmail to get the new emails from the ISP's server and put them in your servers users INBOX's. Any emails the users send are stored on your server in their SENT folder, which you can backup, or copy somewhere else with a script that is run everynight.

I do what you want (without fetchmail) where i backup all emails to backup device, and also have another server connect to the email server and rsync all users email boxes.
You can also tell it to
Reply With Quote
  #5  
Old 15th May 2013, 13:19
poda3 poda3 is offline
Junior Member
 
Join Date: May 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Unfortunatly I can't do that.

Is there a way to avoid the loop or another way to configure postfix to not deliver locally the mails?

Thank you
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
Getting Email Working ISPConfig3 Squirrelmail and Courier etc Ian Wilson Installation/Configuration 17 19th June 2013 22:58
Postfix SMTP Auth to Dovecot Not Working -- HELP! Scratchpad Server Operation 6 12th April 2011 13:29
localhost postfix/master: fatal: bind 127.0.0.1 port 125: Permission denied g18c Installation/Configuration 4 24th March 2009 17:39
Centos 4.4 32bit Hangs, High Server load 3cwired_com Server Operation 11 16th November 2006 15:47
Verify email setup meekish Installation/Configuration 28 27th October 2006 15:36


All times are GMT +2. The time now is 03:32.


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