Re: sendmail on server with ip aliases

2008-07-03 Thread Matthew Seaman

Giorgos Keramidas wrote:

On Wed, 2 Jul 2008 11:56:58 -0400, D W [EMAIL PROTECTED] wrote:

Hello,

Having a problem with sendmail on some of my servers supporting several
virtual apache hosts. Because these servers have 5-10 ip aliases bound, it
sometimes trips up sendmail when sending outbound mail to my smarthost. All
servers are configured to use the same smarthost. But on one of the hosts,
sendmail will send out as the one of the virtual hosts instead of the main
host, which is what I need.

Example: webhost01.webdomain.com is the host.
Five ip aliases for apache virtual servers:


Something is probably missing below the last quoted line.

Are you using jails for the virtual hosts?  If not, then you are
probably using *one* Sendmail instance for all the domains, which still
sends emails as the primary hostname but should work fine...



You can also force sendmail to send /from/ a specific IP by putting some
something like the following into /etc/mail/$(hostname).mc 


dnl Send via the IP number that correctly reverses to our EHLO
CLIENT_OPTIONS(`Name=MTA, Family=inet, Addr=12.34.56.78')

Cheers,

Matthew


--
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
 Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
 Kent, CT11 9PW



signature.asc
Description: OpenPGP digital signature


sendmail on server with ip aliases

2008-07-02 Thread D W
Hello,

Having a problem with sendmail on some of my servers supporting several
virtual apache hosts. Because these servers have 5-10 ip aliases bound, it
sometimes trips up sendmail when sending outbound mail to my smarthost. All
servers are configured to use the same smarthost. But on one of the hosts,
sendmail will send out as the one of the virtual hosts instead of the main
host, which is what I need.

Example: webhost01.webdomain.com is the host.
Five ip aliases for apache virtual servers:
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


sendmail on server with ip aliases and virtual hosts

2008-07-02 Thread D W
Hello,

Having a problem with sendmail on some of my servers supporting several
virtual apache hosts. Because these servers have 5-10 ip aliases bound, it
sometimes trips up sendmail when sending outbound mail to my smarthost. All
servers are configured to use the same smarthost. But on one of the hosts,
sendmail will send out as the one of the virtual hosts instead of the main
host, which is what I need.

Example:

webhost01.webdomain.com (10.10.0.1) is the main host.
mail01.webdomain.com (10.10.10.2) is the smarthost.

Five ip aliases for apache virtual servers:
www.siteA.com (10.10.20.1)
www.siteB.com (10.10.20.2)
www.siteC.com (10.10.20.3)
www.siteD.com (10.10.20.4)
www.siteE.com (10.10.20.5)

But when one I try to:
$ telnet mail01.webdomain.com 25

and watch the maillog on the smarthost, it tells me the connection is coming
from www.siteA.com (or one of the other virtual ip aliases/hosts) instead of
the main host, webhost01.webdomian.com.

This will cause relaying denied failures on the smarthost, unless I go
into the local-host-names and account for every virtual host and add it.

The other puzzling thing is that I have 9 other main hosts with many
virtual hosts, and they all seem to be working the way I expect; ie.,
outbound mail is coming from the main host name/ip instead of one of the
aliases. It's just this webhost01 that is messed up I can't figure out why.
The other thing is that if I destroy an alias, sendmail will use another
aliases, then if I put the destroyed virtual alias back, it may or may not
use it again when sending email.

How do I get sendmail to just send *everything* as from the main host and
connect on the main ip address instead of one of the aliases?

I have in /etc/mail/webhost01.webdomain.com.mc:

OSTYPE(freebsd6)
DOMAIN(generic)
FEATURE(access_db, `hash -o -TTMPF /etc/mail/access')
FEATURE(blacklist_recipients)
FEATURE(local_lmtp)
FEATURE(mailertable, `hash -o /etc/mail/mailertable')
FEATURE(virtusertable, `hash -o /etc/mail/virtusertable')
FEATURE(masquerade_envelope)
FEATURE(`genericstable')
GENERICS_DOMAIN_FILE(`/etc/mail/generics-domains')
MASQUERADE_AS(`webhost01.webdomain.com')
define(`confDOMAIN_NAME', `webhost01.webdomain.com')
define(`SMART_HOST', `mail01.webdomain.com')

and in generics-domains:
webhost01.webdomain.com


Thanks for any help.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: sendmail on server with ip aliases and virtual hosts

2008-07-02 Thread Derek Ragona

At 11:26 AM 7/2/2008, D W wrote:

Hello,

Having a problem with sendmail on some of my servers supporting several
virtual apache hosts. Because these servers have 5-10 ip aliases bound, it
sometimes trips up sendmail when sending outbound mail to my smarthost. All
servers are configured to use the same smarthost. But on one of the hosts,
sendmail will send out as the one of the virtual hosts instead of the main
host, which is what I need.

Example:

webhost01.webdomain.com (10.10.0.1) is the main host.
mail01.webdomain.com (10.10.10.2) is the smarthost.

Five ip aliases for apache virtual servers:
www.siteA.com (10.10.20.1)
www.siteB.com (10.10.20.2)
www.siteC.com (10.10.20.3)
www.siteD.com (10.10.20.4)
www.siteE.com (10.10.20.5)

But when one I try to:
$ telnet mail01.webdomain.com 25

and watch the maillog on the smarthost, it tells me the connection is coming
from www.siteA.com (or one of the other virtual ip aliases/hosts) instead of
the main host, webhost01.webdomian.com.

This will cause relaying denied failures on the smarthost, unless I go
into the local-host-names and account for every virtual host and add it.

The other puzzling thing is that I have 9 other main hosts with many
virtual hosts, and they all seem to be working the way I expect; ie.,
outbound mail is coming from the main host name/ip instead of one of the
aliases. It's just this webhost01 that is messed up I can't figure out why.
The other thing is that if I destroy an alias, sendmail will use another
aliases, then if I put the destroyed virtual alias back, it may or may not
use it again when sending email.

How do I get sendmail to just send *everything* as from the main host and
connect on the main ip address instead of one of the aliases?

I have in /etc/mail/webhost01.webdomain.com.mc:

OSTYPE(freebsd6)
DOMAIN(generic)
FEATURE(access_db, `hash -o -TTMPF /etc/mail/access')
FEATURE(blacklist_recipients)
FEATURE(local_lmtp)
FEATURE(mailertable, `hash -o /etc/mail/mailertable')
FEATURE(virtusertable, `hash -o /etc/mail/virtusertable')
FEATURE(masquerade_envelope)
FEATURE(`genericstable')
GENERICS_DOMAIN_FILE(`/etc/mail/generics-domains')
MASQUERADE_AS(`webhost01.webdomain.com')
define(`confDOMAIN_NAME', `webhost01.webdomain.com')
define(`SMART_HOST', `mail01.webdomain.com')

and in generics-domains:
webhost01.webdomain.com


Thanks for any help.


I would suggest you check both your forward and reverse DNS's for all these 
domains.  Sendmail will use the DNS listings.


Are your virtual apache server's sending the emails from webpages?  If so, 
check your setup on those virtual servers that you are specifying the from 
address including the correct domain.


-Derek

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: sendmail on server with ip aliases

2008-07-02 Thread Giorgos Keramidas
On Wed, 2 Jul 2008 11:56:58 -0400, D W [EMAIL PROTECTED] wrote:
 Hello,

 Having a problem with sendmail on some of my servers supporting several
 virtual apache hosts. Because these servers have 5-10 ip aliases bound, it
 sometimes trips up sendmail when sending outbound mail to my smarthost. All
 servers are configured to use the same smarthost. But on one of the hosts,
 sendmail will send out as the one of the virtual hosts instead of the main
 host, which is what I need.

 Example: webhost01.webdomain.com is the host.
 Five ip aliases for apache virtual servers:

Something is probably missing below the last quoted line.

Are you using jails for the virtual hosts?  If not, then you are
probably using *one* Sendmail instance for all the domains, which still
sends emails as the primary hostname but should work fine...

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]