Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

fetchmail

Status
Not open for further replies.

kubla

Programmer
Feb 7, 2002
50
0
0
IT
Dear All,

fetchmail usually talks SMTP to localhost on port 25. However, I have an antivirus daemon running that intercepts all incoming mail on eth1 and passes it on to the MTA (exim, in this case).

Exim listens on localhost.

I want to configure fetchmail to talk to the external interface, not localhost so that inbound email fetched by fetchmail is also processed by my antivirus daemon.

Can anyone tell me if it's doable?

man hasn't been much help and I've been googling for an hour or two with no luck.

I think it's doable because `fetchmail --configdump` returns:

TRUE=1; FALSE=0

os_type = 'linux'
feature_options = ('pop3','imap','sdps','etrn','odmr',)
# Start of configuration initializer
fetchmailrc = {
'poll_interval':0,
"logfile":None,
"idfile":"/root/.fetchids",
"postmaster":"postmaster",
'bouncemail':TRUE,
'spambounce':FALSE,
"properties":None,
'invisible':FALSE,
'showdots':FALSE,
'syslog':FALSE,
'servers': []
}

the 'servers': [] line suggests that something can be inserted there though, for the life of me, I can't figure out the command to do it.
 

Hmm... First of all, fetchmail doesn't talk to SMTP.

I'm not sure what you're trying to do here but fetchmail should just talk a command line option specifying which host to go to.

I didn't understand a word of the antivirus stuff.

Cheers Henrik Morsing
Certified AIX 4.3 Systems Administration
& p690 Technical Support
 
Sorry, my bad. No, it doesn't talk to SMTP but it talks directly to port 25 on localhost.

I need it to talk to port 25 on another ip. So, rather than fetchmail talking to 127.0.0.1 to deliver mail, I want it to talk to 192.168.0.2. That way, my antivirus daemon will handle the messages before they're passed on to the MTA for delivery.

Ian
 
OK, to answer my own question in case it helps anyone else. The answer is this:

fetchmail -v -q -f /etc/fetchmailrc --smtphost 192.168.0.2

you launch fetchmail with the --smtphost flag and you're good to go.

And re. the confusion above... from the man page:

As each message is retrieved fetchmail normally delivers
it via SMTP to port 25 on the machine it is running on (localhost), just as though it were being passed in over normal TCP/IP link.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top