|
|
|
|
||||||
| comp.mail.sendmail Configuring and using the BSD sendmail agent. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
I have a server that runs several applications one of which prints to
any of 50 network connected printers using fully qualified hosts/domain names. The customer recently started sending email confirmations from a second application resident on that server but does not want the header to include his primary domain name, only the host name. I changed the name from pegasus.domainname.com to pegasus which resolved the header issue but effectively broke access to the 50 printers as they are no longer resolvable by this host. If I put the correct pegasus.domainname.com back the printers work but the header issue returns. Is there a way to configure the /etc/mail/sendmail.mc to tell it to only identify itself as pegasus rather than pegasus.domainname.com? |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
J.R0wan > wrote:
> I have a server that runs several applications one of which prints to > any of 50 network connected printers using fully qualified hosts/domain > names. The customer recently started sending email confirmations from a > second application resident on that server but does not want the header > to include his primary domain name, only the host name. I changed the > name from pegasus.domainname.com to pegasus which resolved the header > issue but effectively broke access to the 50 printers as they are no > longer resolvable by this host. If I put the correct > pegasus.domainname.com back the printers work but the header issue returns. > > Is there a way to configure the /etc/mail/sendmail.mc to tell it to only > identify itself as pegasus rather than pegasus.domainname.com? Which header(s) do you (or does your customer) want to change? Frankly speaking, it's more common that people want to hide the host name and only reflect the domain part in email headers. I assume that you don't want to obfuscate email addresses in From: or Reply-to: headers and the like. So which header(s) _do_ you want to change? The received: headers? I think that would be a violation of RFC2821 which says that al domain names in the message haders should be FQDN's. It certainly will make your messages look more "spammy" and could trigger spam filters. Regards, Kees. -- Kees Theunissen. |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
Kees Theunissen wrote:
> J.R0wan > wrote: >> I have a server that runs several applications one of which prints to >> any of 50 network connected printers using fully qualified >> hosts/domain names. The customer recently started sending email >> confirmations from a second application resident on that server but >> does not want the header to include his primary domain name, only the >> host name. I changed the name from pegasus.domainname.com to pegasus >> which resolved the header issue but effectively broke access to the 50 >> printers as they are no longer resolvable by this host. If I put the >> correct pegasus.domainname.com back the printers work but the header >> issue returns. >> >> Is there a way to configure the /etc/mail/sendmail.mc to tell it to >> only identify itself as pegasus rather than pegasus.domainname.com? > > Which header(s) do you (or does your customer) want to change? > Frankly speaking, it's more common that people want to hide the host > name and only reflect the domain part in email headers. > I assume that you don't want to obfuscate email addresses in > From: or Reply-to: headers and the like. So which header(s) _do_ you > want to change? > The received: headers? I think that would be a violation of RFC2821 > which says that al domain names in the message haders should be > FQDN's. It certainly will make your messages look more "spammy" and > could trigger spam filters. > > > Regards, > > Kees. > The customer only wants the host name, not the fqdn as two companies are having email sent out, the identity of the new company (sales@fqdn2.com) needs to be different from the identity of the existing company which shows in the header below as pegasus.fqdn.com. The customer just wants the hostname, pegasus rather than the pegasus.fqdn.com. From - Wed Apr 25 08:38:47 2007 X-Account-Key: account4 X-UIDL: 462f4b6200000002 X-Mozilla-Status: 0001 X-Mozilla-Status2: 10000000 Return-Path: <pick@pegasus.fqdn.com> Received: from pegasus.fqdn.com ([x.x.x.x]) by vrod (8.12.8/8.12.8) with ESMTP id l3PCY5JD027917 for <sales@fqdn2.com>; Wed, 25 Apr 2007 08:34:05 -0400 Received: from pegasus.fqdn.com (localhost.localdomain [127.0.0.1]) by pegasus.fqdn.com (8.12.8/8.12.8) with ESMTP id l3PCY5CU024440 for <sales@fqdn2.com>; Wed, 25 Apr 2007 08:34:05 -0400 Received: (from pick@localhost) by pegasus.fqdn.com (8.12.8/8.12.8/Submit) id l3PCY4r9024437 for sales@fqdn2.com; Wed, 25 Apr 2007 08:34:04 -0400 From: pick@pegasus.fqdn.com |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
J.R0wan > wrote:
> The customer only wants the host name, not the fqdn as two companies are > having email sent out, the identity of the new company (sales@fqdn2.com) > needs to be different from the identity of the existing company which > shows in the header below as pegasus.fqdn.com. > > The customer just wants the hostname, pegasus rather than the > pegasus.fqdn.com. So be it. Add the following line to your sendmail.mc file and generate a new sendmail.cf. MASQUERADE_AS(`pegasus')dnl This should be placed somewhere in the middle of your sendmail.mc, before the "MAILER" lines. This will rewrite all occurrences of the sender address in the message headers. If you also want to rewrite the envelope sender add also the line: FEATURE(`masquerade_envelop')dnl Finally, if local recipient addresses in the message headers should also be rewritten, you should also use: FEATURE(`allmasquerade')dnl This will do what you asked for. I'm not sure if the effect is what you expect it to be. I'm quite sure this will need special processing at the receiving end, but maybe has your customer such special processing configured. In short: -- external mail servers, without special configuration, will reject your messages because the sender is invalid. -- internal relays or receiving servers, without special configuration, will either reject the invalid sender address or recognize the host name and convert it to a FQDN. :-( A final note: using MASQUERADE_AS will masquerade all mail origin from your server, even output of cron jobs and things like that. It is possible to apply such rewriting to a limited set of sender addresses. Look for 'genericstable' in cf/README if you want to do so, and just ask for if you need with that. The need for special handling of your messages at the receiving end will be the same as mentioned above if you decide to use 'genericstable', for you'll still be generating invalid sender addresses. Regards, Kees. -- Kees Theunissen. |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
Kees Theunissen wrote:
> This will do what you asked for. I'm not sure if the effect is what > you expect it to be. I'm quite sure this will need special processing > at the receiving end, but maybe has your customer such special > processing configured. > In short: > -- external mail servers, without special configuration, will reject > your messages because the sender is invalid. > -- internal relays or receiving servers, without special configuration, > will either reject the invalid sender address or recognize the > host name and convert it to a FQDN. :-( Hmm. Thinking this over.... 02:00 AM probably isn't the optimal moment to answer questions on usenet. If you just change the message headers, as your question was, and not the envelope sender then you're not causing problems with other servers. Sorry for this wrong information. Regards, Kees. -- Kees Theunissen. |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
Kees Theunissen wrote:
> J.R0wan > wrote: >> The customer only wants the host name, not the fqdn as two companies >> are having email sent out, the identity of the new company >> (sales@fqdn2.com) needs to be different from the identity of the >> existing company which shows in the header below as pegasus.fqdn.com. >> >> The customer just wants the hostname, pegasus rather than the >> pegasus.fqdn.com. > > So be it. > > Add the following line to your sendmail.mc file and generate a new > sendmail.cf. > > MASQUERADE_AS(`pegasus')dnl > > This should be placed somewhere in the middle of your sendmail.mc, > before the "MAILER" lines. > This will rewrite all occurrences of the sender address in the message > headers. If you also want to rewrite the envelope sender add also > the line: > > FEATURE(`masquerade_envelop')dnl > > Finally, if local recipient addresses in the message headers should > also be rewritten, you should also use: > > FEATURE(`allmasquerade')dnl > > This will do what you asked for. I'm not sure if the effect is what > you expect it to be. I'm quite sure this will need special processing > at the receiving end, but maybe has your customer such special > processing configured. > In short: > -- external mail servers, without special configuration, will reject > your messages because the sender is invalid. > -- internal relays or receiving servers, without special configuration, > will either reject the invalid sender address or recognize the > host name and convert it to a FQDN. :-( > > > A final note: using MASQUERADE_AS will masquerade all mail origin > from your server, even output of cron jobs and things like that. > It is possible to apply such rewriting to a limited set of sender > addresses. Look for 'genericstable' in cf/README if you want to do > so, and just ask for if you need with that. > The need for special handling of your messages at the receiving end > will be the same as mentioned above if you decide to use > 'genericstable', for you'll still be generating invalid sender > addresses. > > > Regards, > > Kees. > Well I made the changes to sendmail.mc, made a new sendmail.cf and restarted sendmail. After that I sent a test message but it is still laced with the fqdn. *** changes from sendmail.mc MASQUERADE_AS(`pegasus')dnl FEATURE(masquerade_envelope)dnl FEATURE(masquerade_entire_domain)dnl MAILER(smtp)dnl ***** From - Thu Apr 26 11:46:35 2007 X-Account-Key: account4 X-UIDL: 4630c8ec00000001 X-Mozilla-Status: 0001 X-Mozilla-Status2: 00000000 Return-Path: <root@pegasus.fqdn.com> Received: from pegasus.fqdn.com (customer's public IP [x.x.x.x]) by myserver (8.12.8/8.12.8) with ESMTP id l3QFhVld004764 for <>; Thu, 26 Apr 2007 11:43:31 -0400 Received: from pegasus.fqdn.com (localhost.localdomain [127.0.0.1]) by pegasus.fqdn.com (8.12.8/8.12.8) with ESMTP id l3QFhVp6019703 for <myemailaddressremoved>; Thu, 26 Apr 2007 11:43:31 -0400 Received: (from root@localhost) by pegasus.fqdn.com (8.12.8/8.12.8/Submit) id l3QFhV8i019701 for myemailaddressremoved; Thu, 26 Apr 2007 11:43:31 -0400 Date: Thu, 26 Apr 2007 11:43:31 -0400 From: root <root@pegasus.fqdn.com> Message-Id: <200704261543.l3QFhV8i019701@pegasus.fqdn.com> To: myemailaddressremoved Subject: test X-MailScanner-Information: Please contact the ISP for more information X-MailScanner: Found to be clean X-MailScanner-SpamScore: sss X-Spam-Status: No, hits=3.9 required=5.0 tests=RCVD_IN_OSIRUSOFT_COM,SPAM_PHRASE_00_01,X_OS IRU_OPEN_RELAY version=2.44 X-Spam-Level: *** Status: test |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
J.R0wan > wrote:
> Well I made the changes to sendmail.mc, made a new sendmail.cf and > restarted sendmail. After that I sent a test message but it is still > laced with the fqdn. > > *** changes from sendmail.mc > MASQUERADE_AS(`pegasus')dnl > FEATURE(masquerade_envelope)dnl > FEATURE(masquerade_entire_domain)dnl > MAILER(smtp)dnl > > ***** > > From - Thu Apr 26 11:46:35 2007 > X-Account-Key: account4 > X-UIDL: 4630c8ec00000001 > X-Mozilla-Status: 0001 > X-Mozilla-Status2: 00000000 > Return-Path: <root@pegasus.fqdn.com> > Received: from pegasus.fqdn.com (customer's public IP [x.x.x.x]) > by myserver (8.12.8/8.12.8) with ESMTP id l3QFhVld004764 > for <>; Thu, 26 Apr 2007 11:43:31 -0400 > Received: from pegasus.fqdn.com (localhost.localdomain [127.0.0.1]) > by pegasus.fqdn.com (8.12.8/8.12.8) with ESMTP id l3QFhVp6019703 > for <myemailaddressremoved>; Thu, 26 Apr 2007 11:43:31 -0400 > Received: (from root@localhost) > by pegasus.fqdn.com (8.12.8/8.12.8/Submit) id l3QFhV8i019701 > for myemailaddressremoved; Thu, 26 Apr 2007 11:43:31 -0400 > Date: Thu, 26 Apr 2007 11:43:31 -0400 > From: root <root@pegasus.fqdn.com> > Message-Id: <200704261543.l3QFhV8i019701@pegasus.fqdn.com> > To: myemailaddressremoved > Subject: test > X-MailScanner-Information: Please contact the ISP for more information > X-MailScanner: Found to be clean > X-MailScanner-SpamScore: sss > X-Spam-Status: No, hits=3.9 required=5.0 > tests=RCVD_IN_OSIRUSOFT_COM,SPAM_PHRASE_00_01,X_OS IRU_OPEN_RELAY > version=2.44 > X-Spam-Level: *** > Status: > > test Please try to send a test message as a normal user (not root). Messages from root are often excluded from masquerading. Look in your sendmail.mc for a line like: EXPOSED_USER(`root')dnl Which will result in somthing like the lines below in sendmail.cf. # class E: names that should be exposed as from this host, even if we masquerade # class L: names that should be delivered locally, even if we have a relay # class M: domains that should be converted to $M # class N: domains that should not be converted to $M #CL root C{E}root The command echo '$=E' | sendmail -bt will print the contents of your 'E' class of exposed users. Regards, Kees. -- Kees Theunissen. |
|
|
|
#8 |
|
Messages: n/a
Hébergeur: |
Kees Theunissen wrote:
> J.R0wan > wrote: >> Well I made the changes to sendmail.mc, made a new sendmail.cf and >> restarted sendmail. After that I sent a test message but it is still >> laced with the fqdn. >> >> *** changes from sendmail.mc >> MASQUERADE_AS(`pegasus')dnl >> FEATURE(masquerade_envelope)dnl >> FEATURE(masquerade_entire_domain)dnl >> MAILER(smtp)dnl >> >> ***** >> >> From - Thu Apr 26 11:46:35 2007 >> X-Account-Key: account4 >> X-UIDL: 4630c8ec00000001 >> X-Mozilla-Status: 0001 >> X-Mozilla-Status2: 00000000 >> Return-Path: <root@pegasus.fqdn.com> >> Received: from pegasus.fqdn.com (customer's public IP [x.x.x.x]) >> by myserver (8.12.8/8.12.8) with ESMTP id l3QFhVld004764 >> for <>; Thu, 26 Apr 2007 11:43:31 -0400 >> Received: from pegasus.fqdn.com (localhost.localdomain [127.0.0.1]) >> by pegasus.fqdn.com (8.12.8/8.12.8) with ESMTP id l3QFhVp6019703 >> for <myemailaddressremoved>; Thu, 26 Apr 2007 11:43:31 -0400 >> Received: (from root@localhost) >> by pegasus.fqdn.com (8.12.8/8.12.8/Submit) id l3QFhV8i019701 >> for myemailaddressremoved; Thu, 26 Apr 2007 11:43:31 -0400 >> Date: Thu, 26 Apr 2007 11:43:31 -0400 >> From: root <root@pegasus.fqdn.com> >> Message-Id: <200704261543.l3QFhV8i019701@pegasus.fqdn.com> >> To: myemailaddressremoved >> Subject: test >> X-MailScanner-Information: Please contact the ISP for more information >> X-MailScanner: Found to be clean >> X-MailScanner-SpamScore: sss >> X-Spam-Status: No, hits=3.9 required=5.0 >> tests=RCVD_IN_OSIRUSOFT_COM,SPAM_PHRASE_00_01,X_OS IRU_OPEN_RELAY >> version=2.44 >> X-Spam-Level: *** >> Status: >> >> test > > Please try to send a test message as a normal user (not root). > Messages from root are often excluded from masquerading. > > Look in your sendmail.mc for a line like: > EXPOSED_USER(`root')dnl > > Which will result in somthing like the lines below in sendmail.cf. > > # class E: names that should be exposed as from this host, even if we > masquerade > # class L: names that should be delivered locally, even if we have a > relay > # class M: domains that should be converted to $M > # class N: domains that should not be converted to $M > #CL root > C{E}root > > > The command > echo '$=E' | sendmail -bt > will print the contents of your 'E' class of exposed users. > > > Regards, > > Kees. > Thanks in advance for you efforts in this matter. Logged into specific proprietary database application which sends email as non privileged user "pick". Still showing fqdn in header. Here are results from echo command: [root@pegasus root]# echo '$=E' | sendmail -bt ADDRESS TEST MODE (ruleset 3 NOT automatically invoked) Enter <ruleset> <address> > root > [root@pegasus root]# From - Thu Apr 26 14:42:26 2007 X-Account-Key: account1 X-UIDL: 4630f22400000001 X-Mozilla-Status: 0001 X-Mozilla-Status2: 00000000 Return-Path: <pick@pegasus.fqdn.com> Received: from pegasus.fqdn.com (fax.fqdn.com [192.168.4.5]) by lazarus.fqdn.com (8.11.6/8.11.6) with ESMTP id l3QIdvC18554 for <rowan@fqdn.com>; Thu, 26 Apr 2007 14:39:57 -0400 Received: from pegasus.fqdn.com (localhost.localdomain [127.0.0.1]) by pegasus.fqdn.com (8.12.8/8.12.8) with ESMTP id l3QIdv0E027240 for <rowan@fqdn.com>; Thu, 26 Apr 2007 14:39:57 -0400 Received: (from pick@localhost) by pegasus.fqdn.com (8.12.8/8.12.8/Submit) id l3QIdvMo027238 for rowan@fqdn.com; Thu, 26 Apr 2007 14:39:57 -0400 Date: Thu, 26 Apr 2007 14:39:57 -0400 From: pick@pegasus.fqdn.com Message-Id: <200704261839.l3QIdvMo027238@pegasus.fqdn.com> To: rowan@fqdn.com Subject: test X-MailScanner-Information: Please contact the ISP for more information X-MailScanner: Found to be clean X-MailScanner-SpamCheck: Status: test |
|
![]() |
| Outils de la discussion | |
|
|