1829160 Members
7130 Online
109986 Solutions
New Discussion

Sendmail related...

 
kcpant
Trusted Contributor

Sendmail related...

Hi Friends,


Please tell me how I can "hide" the information about my internal network to go out as header information? I am using a sendmail version, and I found that it passes out the header informations of internal clients as it is, like the IP address of internal host sending mail, and it's domain name etc. I want to replace this information with that of sendmail server. One more thing is, the time information on the mails is also of the host which is sending it, I also want it to be changed to that of the server.

thanks in advance...
PreSales Specialist
7 REPLIES 7
Bejoy C Alias
Respected Contributor

Re: Sendmail related...

These things are done by ur rule sets in sendmail.cf file . U need to remove the rules which are adding the Received From headers from sendmail.cf . Search this header name and u will find out the ruleset which is appending this header to ur mail . U may need to read some documents about rule writing in sendmail for better understanding .
Be Always Joy ......
Bejoy C Alias
Respected Contributor

Re: Sendmail related...

Sorry it is not the rule set but the header definitions will append the Received From header in ur mail . See the lines starting with H letter in ur sendmail.cf , but u may need to study about the rulesets for understanding the modification of the headers .
Be Always Joy ......
Steven E. Protter
Exalted Contributor

Re: Sendmail related...

If you use the Dj directive some if the internal imformation will not be present.

If the machine has an external ip address, you can make that the primary for the machine and then it will be what shows. That is a public IP address and would work.

Lastly, you can set up a relay server in a dmz. Use the sendmail DS directive and relay all mail to that server. The header that the end user gets should only contain information about the relay server.

At the very least this can reduce the amount of information that goes in the header.

I recommend against any kind of special sendmail hack's because those can be a bear to maintain.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
kcpant
Trusted Contributor

Re: Sendmail related...

Hi Friends,

thanks for your suggestions.
Bejoy, I don't want to manually edit sendmail.cf, instead, I would like to do this if possible through macro (sendmail.mc).

SEP, as far as I have seen, even if you use a DS (relay server), your actual Ip address & host name get transmitted in headers in default configurations. I want to just hide this information to go out.The clients in this network are MS outlook, and the internal network is private (192.168.0.0). all clients send their mails through a sendmail server, and these mails are then routed to a mail service provider's Qmail server. when I check a mail's header information from outside the netowrk, I found that it contains IP (192.168.x.x) as well as name of the client which sent it.Moreover, time of mail sent is also as of the client's clock settings. I also want it to be changed to that of sendmail server.
PreSales Specialist
Bejoy C Alias
Respected Contributor

Re: Sendmail related...

I dont think that u can do this by simply modifying the sendmail.mc and creating a new cf file ( but i'm not sure ). U can comment out the Received: header definitions in sendmail.cf to exclude that line in ur sendmail server so it will not add that header to ur mails .But the qmail server will add the Received header which will include ur sendmail server's address . Also the Date header is normally added from ur outlook client , as per my knowledge there is no way to remove that thing from outlook , the sendmail server will add the server's date only if there is no Date header already defined in the received mail . U can change the Date header definition in sendmail.cf file to add one more Date field of server , but no idea to remove the already added header from the mail.
Be Always Joy ......
Rick Garland
Honored Contributor

Re: Sendmail related...

The sendmail RPM packages must be loaded in order to get the documentation and the mc files.

You will want to create (or modify an existing) mc file with the MASQUERADE and/or MASQUERADE_AS definition(s). (You can find examples in the /usr/share/sendmail-cf directory, if the sendmail RPMs are loaded) Once the modifications are complete to the mc file you will need to run the m4 preprecessor against it. This will create the .cf file that you put into place.

(Note; easier to modify the sendmail.cf file, but more of a challange and learning experience if you "roll your own".)

Lots of good information and examples from the www.sendmail.org site.

As to the time stamp on the mail file, the relay host that is sending the file as no interaction with the mail file. It sees that this mail is to go out and the relay just passes it. No looking at contents, no modification of file, etc.

If you need the times changed you will need to send the mail from that relay host.

kcpant
Trusted Contributor

Re: Sendmail related...

Closing threads open from a long time....
PreSales Specialist