Hi all!
Firstly, apologies for the bizarre solution I'm trying to implement. The
only reason I'm trying to get it to work like this is because of time and
money considerations. As such, I'll be equally appreciative if someone
manages to come up with a quick and dirty fix or a more robust solution.
DNS examples customers-domain.com
----------------------------------------------------------------------------
--------
customers-domain.com. MX IN 86400 mail.my-domain.com. [Preference
= 5]
customers-domain.com. MX IN 86400 mail.tobitmail.net. [Preference
= 10]
customers-domain.com. MX IN 86400 relay1.tobitmail.net. [Preference
= 50]
customers-domain.com. MX IN 86400 relay.tobitmail.net. [Preference
= 90]
----------------------------------------------------------------------------
--------
We use Tobit as an internal mail server at various customers. For many years
'Tobit Software' provided us with three mail servers (mail.tobitmail.net,
relay1.tobitmail.net, relay.tobitmail.net.) for an annual fee. One
destination and two backup mail servers. These servers were managed by Tobit
Software's UK branch, which has recently split from Tobit Software, however
the UK branch are still managing these servers, but we don't know for how
long.
As a result, I have setup a Postfix (v2.2.2) mail server on a dedicate
server on the Internet. Its running in a virtual domain situation (i.e. it
is the destination server for more than one domain).
The customers internal Tobit mail servers were configured to ATRN (like an
ETRN) mail from mail.tobitmail.net every couple of minutes. I've added a 2nd
'account' to collect mail from mail.my-domain.com via ETRN every few
minutes. I'm basically just collecting mail for the same domain from two
places. Obviously, all mail should be going to mail.my-domain.com, however
the odd mail does come though via mail.tobitmail.net whenever
mail.my-domain.com is unreachable, but is seldom, it is mostly spam that
uses the mail.tobitmail.net server).
This has been working well for some time. The problem is that the Anti SPAM
and Anti Virus on the tobitmail server has been disabled (apparently because
a few of their customers where complaining of losing legitimate email).
What I'd like to be able to do is fetchmail from mail.tobitmail.net to
mail.my-domain.com so that my anti-spam and anti-virus software will clean
the customers mail before it gets to their internal mail server.
I have tried the following two methods
1) ATRN using fetchmail. This would have been my preferred method as it
would keep headers intact. But authentication fails because the
mail.tobitmail.net requires the EHLO response to be the domain I wish to
collect mail for (Not RFC compliant I believe). Fetchmail always says "EHLO
localhost", unless I set the hostname to customers-domain.com before running
fetchmail. Obviously I don't want to have to keep renaming server, as I have
a few domains I'd like to collect mail for. Would have been lovely if there
was a -ehlo option!
2) I've just tired using fetchmail via POP3. If I run it with a --check it
tells me mails their to collect. If I knock the --check off it starts doing
its thing, then starts printing lots of dots. I assumed that this was a
progress report just telling me fetchmail is working, but even when I've
left it running for 10 minutes when one very small email is in the mailbox
its still echoing dots.
Heres the verbose output :-
[root(_at_)sunset ~]# fetchmail --username=USERNAME --verbose
--smtphost=localhost mail.tobitmail.net
Enter password for USERNAME(_at_)mail(_dot_)tobitmail(_dot_)net:
fetchmail: 6.2.5 querying mail.tobitmail.net (protocol auto) at Wed 22 Feb
2006 15:00:13 GMT: poll started
fetchmail: 6.2.5 querying mail.tobitmail.net (protocol IMAP) at Wed 22 Feb
2006 15:00:13 GMT: poll started
fetchmail: 6.2.5 querying mail.tobitmail.net (protocol IMAP) at Wed 22 Feb
2006 15:00:14 GMT: poll completed
fetchmail: 6.2.5 querying mail.tobitmail.net (protocol POP3) at Wed 22 Feb
2006 15:00:14 GMT: poll started
fetchmail: POP3< +OK DvISE Mail Access Server Server ready (Tobit Software,
Germany)
fetchmail: POP3> CAPA
fetchmail: POP3< -ERR Unknown command
fetchmail: Unknown command
fetchmail: Repoll immediately on USERNAME(_at_)mail(_dot_)tobitmail(_dot_)net
fetchmail: POP3< +OK DvISE Mail Access Server Server ready (Tobit Software,
Germany)
fetchmail: POP3> USER USERNAME
fetchmail: POP3< +OK User USERNAME well known
fetchmail: POP3> PASS *
fetchmail: POP3< +OK User USERNAME has 2 messages
fetchmail: POP3> STAT
fetchmail: POP3< +OK 2 3584
fetchmail: POP3> LAST
fetchmail: POP3< +OK 0
2 messages for USERNAME at mail.tobitmail.net (3584 octets).
fetchmail: POP3> LIST 1
fetchmail: POP3< +OK 1 2621
fetchmail: POP3> TOP 1 99999999
fetchmail: POP3< +OK Top of message follows
reading message USERNAME(_at_)mail(_dot_)tobitmail(_dot_)net:1 of 2 (2621
octets)
fetchmail: SMTP< 220 ESMTP
fetchmail: SMTP> EHLO localhost
fetchmail: SMTP< 250-mail.my-domain.com
fetchmail: SMTP< 250-PIPELINING
fetchmail: SMTP< 250-SIZE 104857600
fetchmail: SMTP< 250-VRFY
fetchmail: SMTP< 250-ETRN
fetchmail: SMTP< 250-AUTH LOGIN PLAIN
fetchmail: SMTP< 250-AUTH=LOGIN PLAIN
fetchmail: SMTP< 250 8BITMIME
fetchmail: SMTP> MAIL FROM:<sdafasf(_at_)asfasfasdfsa(_dot_)example>
BODY=8BITMIME
SIZE=2621
fetchmail: SMTP< 250 Ok
fetchmail: SMTP> RCPT TO:<root(_at_)localhost>
fetchmail: SMTP< 250 Ok
fetchmail: SMTP> DATA
fetchmail: SMTP< 354 End data with <CR><LF>.<CR><LF>
#********************************************************************.******
**************************************************************.*************
*******************************************************.********************
*************************************************.**************************
******************************************.*********************************
***********************************.****************************************
****************************.***********************************************
**********************.*****************************************************
***************.************************************************************
********.*******************************************************************
*.*********************************************************************.****
****************************************************************.***********
*********************************************************.******************
**************************************************.*************************
*****************************fetchmail: terminated with signal 2
The most obvious question I have is why is the mail being sent to
root(_at_)localhost? (RCPT TO:<root(_at_)localhost>). I'd have expected to see
RCPT
TO:<user(_at_)customers-domain(_dot_)com>? Regardless of that, why am I getting
dotted
to death?
I know most peoples initiate reaction is to say get another server on the
internet and get that running as a backup server for your domains and remove
the tobit mail servers MX records from the domain. That is my overall plan,
but I need time and money to get to that stage.
Thanks in advance to anyone who has any suggestions or comments to give.
cheers
Steve
_____
avast! Antivirus <http://www.avast.com> : Outbound message clean.
Virus Database (VPS): 0608-0, 20/02/2006
Tested on: 22/02/2006 15:22:31
avast! - copyright (c) 1988-2005 ALWIL Software.
_______________________________________________
Fetchmail-friends mailing list
Fetchmail-friends(_at_)lists(_dot_)ccil(_dot_)org
http://lists.ccil.org/cgi-bin/mailman/listinfo/fetchmail-friends