|
|
|
|
||||||
| comp.mail.sendmail Configuring and using the BSD sendmail agent. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hi all,
we're using Version 8.11.6p2 on AIX 5.3. The subject says what's the problem: When I send an e-mail via /usr/bin/mail from an AIX-Partition to our internal mail relay, this mail arrives with a sender address user@host.mydomain.de. We would like to have user@mydomain.de, i.e. the hostname should not appear in the sender address. I'v tried compiling different settings in /usr/samples/tcpip/sendmail/cf/aixsample.cf (MASQUERADE_AS, etc....) with no success. Sendmail seems to be tooo complicated for me :-( Any ideas? Thanks in advance! Pete |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
Pete wrote:
> Hi all, > > we're using Version 8.11.6p2 on AIX 5.3. > > The subject says what's the problem: When I send an e-mail via > /usr/bin/mail from an AIX-Partition to our internal mail relay, this > mail arrives with a sender address user@host.mydomain.de. We would like > to have user@mydomain.de, i.e. the hostname should not appear in the > sender address. > > I'v tried compiling different settings in > /usr/samples/tcpip/sendmail/cf/aixsample.cf (MASQUERADE_AS, etc....) > with no success. Sendmail seems to be tooo complicated for me :-( :-( OK try http://www.sendmail.org/m4/masquerading_relaying.html As you don't show us the relevant .mc file that is all we can do for now. cheers Erich |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
mega schrieb:
> Pete wrote: > > Hi all, > > > > we're using Version 8.11.6p2 on AIX 5.3. > > > > The subject says what's the problem: When I send an e-mail via > > /usr/bin/mail from an AIX-Partition to our internal mail relay, this > > mail arrives with a sender address user@host.mydomain.de. We would like > > to have user@mydomain.de, i.e. the hostname should not appear in the > > sender address. > > > > I'v tried compiling different settings in > > /usr/samples/tcpip/sendmail/cf/aixsample.cf (MASQUERADE_AS, etc....) > > with no success. Sendmail seems to be tooo complicated for me :-( > > :-( > > OK try > > http://www.sendmail.org/m4/masquerading_relaying.html > > As you don't show us the relevant .mc file that is all we can do for now. > Hi Erich, thanks, I was already poking around in the sendmail manuals. IBM ships the file /usr/samples/tcpip/sendmail/cf/aixsample.mc with AIX: ..... # Sample AIX file divert(0)dnl OSTYPE(aixsample)dnl FEATURE(genericstable)dnl FEATURE(mailertable)dnl FEATURE(virtusertable)dnl FEATURE(domaintable)dnl FEATURE(allmasquerade)dnl FEATURE(promiscuous_relay)dnl FEATURE(accept_unresolvable_domains)dnl FEATURE(accept_unqualified_senders)dnl FEATURE(no_default_msa) DOMAIN(generic)dnl define(`confSMTP_LOGIN_MSG', `$j Sendmail $b') MAILER(local)dnl MAILER(smtp)dnl MAILER(uucp) In the README they specify an exact order how to put things together but MASQUERADE_AS or the other decalarations are not mentioned. Which declaration(s) do I have to add and where? Thanks Pete |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
Pete wrote:
... > > Hi Erich, > > thanks, I was already poking around in the sendmail manuals. > > IBM ships the file /usr/samples/tcpip/sendmail/cf/aixsample.mc with > AIX: Yes I looked at it on an AIX 5.3, poorly documented, but there is always sendmail.org > > .... > # Sample AIX file > divert(0)dnl > OSTYPE(aixsample)dnl > FEATURE(genericstable)dnl > FEATURE(mailertable)dnl > FEATURE(virtusertable)dnl > FEATURE(domaintable)dnl > FEATURE(allmasquerade)dnl Not sure you need the allmasquerade according to the sendmail docs something like the following If you want to masquerade all hosts in the domain, use this feature FEATURE(`masquerade_entire_domain')dnl MASQUERADE_AS(`host.domain')dnl should be enough to masquerade your host, if you need to masquerade more hosts add MASQUERADE_DOMAIN(`otherhost.domain')dnl > FEATURE(promiscuous_relay)dnl this one is dangerous, it opens up your MTA ..... But then all this is explained at sendmail.org, a lot better than I could ever do. cheers Erich |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
Hi,
just to clarify things: Sendmail on this partition doesn't act as an MTA for other hosts. In fact, sendmail isn't running at all. I've seen that it's started for a short moment when I run /usr/bin/mail. The AIX partition is just an SMTP client and wants to send mails to our MTA (MS-Exchange). Of course I've checked sendmail.org but isn't that easy to understand ..... My aixsample.mc looks like this now, but the MASQUERADE_AS option seems not to have any effect: # Sample AIX file divert(0)dnl OSTYPE(aixsample)dnl FEATURE(genericstable)dnl FEATURE(virtusertable)dnl FEATURE(masquerade_entire_domain)dnl FEATURE(masquerade_envelope)dnl FEATURE(accept_unresolvable_domains)dnl FEATURE(accept_unqualified_senders)dnl FEATURE(no_default_msa) MASQUERADE_AS(`mydomain.de')dnl DOMAIN(generic)dnl define(`confSMTP_LOGIN_MSG', `$j Sendmail $b') MAILER(local)dnl MAILER(smtp)dnl MAILER(uucp) When I send a mail on this partition I get the following (I changed our real domain to mydomain.de ;-)): root@aixutil: /etc/mail # mail -v -s Test user@mydomain.de < /dev/zero Null message body; hope that's ok user@mydomain.de... Connecting to mail.mydomain.de. via esmtp... 220 ntex1.mydomain.de ESMTP Server (Microsoft Exchange Internet Mail Service 5.5.2657.72) ready >>> EHLO host.mydomain.de 250-ntex1.mydomain.de Hello [host.mydomain.de] 250-XEXCH50 250- 250-ETRN 250-DSN 250-SIZE 0 250-AUTH LOGIN 250 AUTH=LOGIN >>> MAIL From:<root@host.mydomain.de> SIZE=48 250 OK - mail from <root@host.mydomain.de>; can accomodate 48 bytes >>> RCPT To:<user@mydomain.de> 250 OK - Recipient <user@mydomain.de> >>> DATA 354 Send data. End with CRLF.CRLF >>> . 250 OK user@mydomain.de... Sent (OK) Closing connection to mail.mydomain.de. >>> QUIT 221 closing connection root@host: /etc/mail # In the EHLO and the Mail From lines we still have the host.... :-( Any ideas? TIA Pete |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
Edit /etc/sendmail.cf
Rule set 93 & 94 (masquerade) Replace $j (host.domain) by $m (domain) !!!Here under are these 2 Rule sets, I putted the modification between double-quote("$m"). Don't put these double-quote but rather what they contain!!! ################################################## ################# ### Ruleset 93 -- convert header names to masqueraded form ### ################################################## ################# S93 # handle generics database #R$+ < @ $=G . > $: < $1@$2 > $1 < @ $2 . > @ mark #R$+ < @ *LOCAL* > $: < $1@$j > $1 < @ *LOCAL* > @ mark #R< $+ > $+ < $* > @ $: < $(generics $1 $: $) > $2 < $3 > #R< > $+ < @ $+ > $: < $(generics $1 $: $) > $1 < @ $2 > #R< $* @ $* > $* < $* > $@ $>3 $1 @ $2 found qualified #R< $+ > $* < $* > $: $>3 $1 @ *LOCAL* found unqualified #R< > $* $: $1 not found # special case the users that should be exposed R$=E < @ *LOCAL* > $@ $1 < @ "$m" . > leave exposed R$=E < @ $=M . > $@ $1 < @ $2 . > R$=E < @ $=w . > $@ $1 < @ $2 . > # handle domain-specific masquerading R$* < @ $=M . > $* $: $1 < @ $2 . @ $M > $3 convert masqueraded doms R$* < @ $=w . > $* $: $1 < @ $2 . @ $M > $3 R$* < @ *LOCAL* > $* $: $1 < @ "$m" . @ $M > $2 R$* < @ $+ @ > $* $: $1 < @ $2 > $3 $M is null R$* < @ $+ @ $+ > $* $: $1 < @ $3 . > $4 $M is not null ################################################## ################# ### Ruleset 94 -- convert envelope names to masqueraded form ### ################################################## ################# S94 R$* < @ *LOCAL* > $* $: $1 < @ "$m" . > $2 compile sendmail.cf by the command: sendmail -bi refresh -s sendmail Hope this . |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
Hi,
many thanks, that works!!! I would have never been able to solve this on my own. Thanks again + kind regards Pete |
|
|
|
#8 |
|
Messages: n/a
Hébergeur: |
Pete wrote:
> Hi, > > just to clarify things: Sendmail on this partition doesn't act as an > MTA for other hosts. In fact, sendmail isn't running at all. I've seen > that it's started for a short moment when I run /usr/bin/mail. The AIX > partition is just an SMTP client and wants to send mails to our MTA > (MS-Exchange). > > Of course I've checked sendmail.org but isn't that easy to understand > .... > > My aixsample.mc looks like this now, but the MASQUERADE_AS option seems > not to have any effect: > > # Sample AIX file > divert(0)dnl > OSTYPE(aixsample)dnl > FEATURE(genericstable)dnl > FEATURE(virtusertable)dnl > FEATURE(masquerade_entire_domain)dnl > FEATURE(masquerade_envelope)dnl > FEATURE(accept_unresolvable_domains)dnl > FEATURE(accept_unqualified_senders)dnl > FEATURE(no_default_msa) > MASQUERADE_AS(`mydomain.de')dnl > DOMAIN(generic)dnl > define(`confSMTP_LOGIN_MSG', `$j Sendmail $b') > MAILER(local)dnl > MAILER(smtp)dnl > MAILER(uucp) > > When I send a mail on this partition I get the following (I changed our > real domain to mydomain.de ;-)): > > root@aixutil: /etc/mail # mail -v -s Test user@mydomain.de < /dev/zero > Null message body; hope that's ok > user@mydomain.de... Connecting to mail.mydomain.de. via esmtp... > 220 ntex1.mydomain.de ESMTP Server (Microsoft Exchange Internet Mail > Service 5.5.2657.72) ready >>>> EHLO host.mydomain.de > 250-ntex1.mydomain.de Hello [host.mydomain.de] > 250-XEXCH50 > 250- > 250-ETRN > 250-DSN > 250-SIZE 0 > 250-AUTH LOGIN > 250 AUTH=LOGIN >>>> MAIL From:<root@host.mydomain.de> SIZE=48 > 250 OK - mail from <root@host.mydomain.de>; can accomodate 48 bytes >>>> RCPT To:<user@mydomain.de> > 250 OK - Recipient <user@mydomain.de> >>>> DATA > 354 Send data. End with CRLF.CRLF >>>> . > 250 OK > user@mydomain.de... Sent (OK) > Closing connection to mail.mydomain.de. >>>> QUIT > 221 closing connection > root@host: /etc/mail # > > In the EHLO and the Mail From lines we still have the host.... :-( > > Any ideas? TIA You did compile sendmail.cf from this and install it to /etc/mail? cheers Erich |
|
![]() |
| Outils de la discussion | |
|
|