How to receive incoming mail on port xxx, outgoing mail on port 25?

This is a discussion on How to receive incoming mail on port xxx, outgoing mail on port 25? within the alt.comp.mail.exim forums, part of the Mail Servers and Related category; Hello, I posted this question before, but no success yet. I'm using Exim 4.42 on Linux RH Fedora ...


Go Back   Usenet Forums > Mail Servers and Related > alt.comp.mail.exim

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-07-2004
Chris Fortune
 
Posts: n/a
Default How to receive incoming mail on port xxx, outgoing mail on port 25?

Hello,

I posted this question before, but no success yet. I'm using Exim 4.42 on
Linux RH Fedora core (2.4.20-021stab022.2.777-smp).

Does anybody know, How Do I ..... ?

1. Receive mail on port 25 using a perl anti-spam SMTP daemon
(assp.sourceforge.net) - this part works ok
2. Relay good mail to Exim, which is listening on an unused port, and Exim
will not accept relaying from any other host.
3. Exim can SMTP out on port 25

I tried changing /etc/services from:
smtp 25/tcp mail
smtp 25/udp mail

to:
smtp 125/tcp mail
smtp 125/udp mail

and it worked perfectly to receive mail on port 125 except for one problem:
Exim sent mail out of port 125 too, making it incompatible with the rest of
the Internet. Christian Scmidt kindly recommended creating a transport, but
I was not able to get it working. Any ideas?

Thanks,
Chris


Reply With Quote
  #2 (permalink)  
Old 10-07-2004
Christian Schmidt
 
Posts: n/a
Default Re: How to receive incoming mail on port xxx, outgoing mail on port 25?

Hello Chris,

Chris Fortune schrieb/wrote:

> Does anybody know, How Do I ..... ?
>
> 1. Receive mail on port 25 using a perl anti-spam SMTP daemon
> (assp.sourceforge.net) - this part works ok
> 2. Relay good mail to Exim, which is listening on an unused port, and Exim
> will not accept relaying from any other host.


When your exim isn't listening on port 25, the decision about
accepting an email or not is taken out of exim's hands.
When your anti-spam daemon has _accepted_ a mail, rejecting it with
exim doesn't actually have any effect...

> 3. Exim can SMTP out on port 25


My exim is listening on port 825 for incoming connections. In my
exim.conf, I added the lines

# Run exim on smtp-backdoor Port:
daemon_smtp_port = smtp-backdoor

and my /etc/services contains the following entries:

smtp 25/tcp mail
smtp-backdoor 825/tcp

Thus, exim listens on port 825 for incoming connections, but correctly delivers
outgoing mails to remote port 25.

Changing exim's port from 25 became necessary because I'm running an
AntiVir daemon that "occupies" port 25 and passes scanned mails on to

Chris, I'm wondering why you obviously tend to a kind of "special
solutions".
Just have a look at the docs that are shipped with the exsican-acl
patch. It mentions examples of how to integrate Anti-Spam-software
into exim's ACLs. With this setup, you can even scan mails "at SMTP"
time...
exim.

Gruss,
Christian
--
Christian Schmidt | Germany | ChriSchmiLi@gmx.de
PGP Key ID: 0x28266F2C
Reply With Quote
  #3 (permalink)  
Old 10-08-2004
Chris Fortune
 
Posts: n/a
Default Re: How to receive incoming mail on port xxx, outgoing mail on port 25?

> When your exim isn't listening on port 25, the decision about
> accepting an email or not is taken out of exim's hands.
> When your anti-spam daemon has _accepted_ a mail, rejecting it with
> exim doesn't actually have any effect...
>

It attempts delivery to Exim before the final 250 accepted response, and if
Exim rejects, that rejection is passed back to the sending MTA.


> My exim is listening on port 825 for incoming connections. In my
> exim.conf, I added the lines
>
> # Run exim on smtp-backdoor Port:
> daemon_smtp_port = smtp-backdoor
>
> and my /etc/services contains the following entries:
>
> smtp 25/tcp mail
> smtp-backdoor 825/tcp
>
> Thus, exim listens on port 825 for incoming connections, but correctly

delivers
> outgoing mails to remote port 25.
>
> Changing exim's port from 25 became necessary because I'm running an
> AntiVir daemon that "occupies" port 25 and passes scanned mails on to
>

Yes, exactly what I am trying to do, but I couldn't get the exim.conf sorted
out - Exim would not compile.

/* from the docs */
11. Main configuration
The first part of the run time configuration file contains the main
configuration settings.

daemon_smtp_port
Type: string
Default: unset
This option specifies the numerical port number or the service name
equivalent on which the daemon is to listen for incoming SMTP calls. It is
overridden by -oX on the command line. If this option is not set, the
service name `smtp' is used.

There is the problem: WHM adds an -oX option of SSL port 465 every restart
(and it restarts Exim quite a few times a month during its nightly
upgrades). Looks like I will have to go to the WHM list to finish this job.


> Chris, I'm wondering why you obviously tend to a kind of "special
> solutions".
> Just have a look at the docs that are shipped with the exsican-acl
> patch. It mentions examples of how to integrate Anti-Spam-software
> into exim's ACLs. With this setup, you can even scan mails "at SMTP"
> time...


Oh, believe me I read ACL and Exiscan docs and source code until my eyes
hurt. Needed a solution that could port to any MTA in any network
configuration, and Exiscan looked too much like a 'special solution'. An
SMTP daemon seemed the perfect choice. I had already written a perl
pop-forwarding script that did 90% of what I wanted, so integrating it with
assp was a snap.



Reply With Quote
  #4 (permalink)  
Old 10-10-2004
Christian Schmidt
 
Posts: n/a
Default Re: How to receive incoming mail on port xxx, outgoing mail on port 25?

Hello Chris,

Chris Fortune schrieb/wrote:

>> Changing exim's port from 25 became necessary because I'm running an
>> AntiVir daemon that "occupies" port 25 and passes scanned mails on to
>>

> Yes, exactly what I am trying to do,


No!!
You changed the "SMTP" port definition in /etc/services.
What I have done, was _adding_ an entry to /etc/services.

> but I couldn't get the exim.conf sorted
> out - Exim would not compile.
>
> /* from the docs */
> 11. Main configuration
> The first part of the run time configuration file contains the main
> configuration settings.
>
> daemon_smtp_port
> Type: string
> Default: unset
> This option specifies the numerical port number or the service name
> equivalent on which the daemon is to listen for incoming SMTP calls.


Why don't you give a chance to the example I posted here?
It's exactly what you have quoted from the exim docs here.

But remember: Leave the original entry for SMTP in /etc/services as
ist is!

> It is
> overridden by -oX on the command line. If this option is not set, the
> service name `smtp' is used.
>
> There is the problem: WHM adds an -oX option of SSL port 465 every restart
> (and it restarts Exim quite a few times a month during its nightly
> upgrades). Looks like I will have to go to the WHM list to finish this job.


What does "WHM" mean?
Can't you change the options it is invoked with?

Gruss,
Christian
--
Christian Schmidt | Germany | ChriSchmiLi@gmx.de
PGP Key ID: 0x28266F2C
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 02:05 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0