LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   sendmail & Suse 8.0 & outgoing adress rewrite (https://www.linuxquestions.org/questions/linux-software-2/sendmail-and-suse-8-0-and-outgoing-adress-rewrite-81933/)

mule 08-14-2003 09:32 AM

sendmail & Suse 8.0 & outgoing adress rewrite
 
hi,

i have 2 servers running. now one server should send its status-messages by mail to the other.

problem is: i need to rewrite the adresse from hostname.domain.tld to domain.tld

i already tried MASQUERADE_AS, entries in genericstabe, entries in the etc/sysconfig/mail...but nothing help

i could easily resolve this taking out the line, saying my MTA not to accept mails from non-fqdn-senders. But it's not my goal.

Does anybody have any other solution?

Cheer-io

jqcaducifer 08-14-2003 11:08 AM

well, i don't know about Suse 8, (i have rh9) but i assume you have the latest version of sendmail. On rh9, the default folder for most of the configs is /etc/mail, yours might be different. Mine also has a file with an extension of *.mc. You need to edit this file, either editing out the comments for MASQUERADE_AS, or adding your own. These are the lines that appear as comments in my sendmail.mc file:

Code:


dnl # The following example makes mail from this host and any additional
dnl # specified domains appear to be sent from mydomain.com
dnl #
dnl MASQUERADE_AS(`mydomain.com')dnl
dnl #
dnl # masquerade not just the headers, but the envelope as well
dnl #
dnl FEATURE(masquerade_envelope)dnl
dnl #
dnl # masquerade not just @mydomainalias.com, but @*.mydomainalias.com as well
dnl #
dnl FEATURE(masquerade_entire_domain)dnl
dnl #
dnl MASQUERADE_DOMAIN(localhost)dnl
dnl MASQUERADE_DOMAIN(localhost.localdomain)dnl
dnl MASQUERADE_DOMAIN(mydomainalias.com)dnl
dnl MASQUERADE_DOMAIN(mydomain.lan)dnl

For the lines you want to use, just get rid of the starting "dnl", and add it to your file. You then need to use m4 to compile the mc file into a cf file. On my machine, it was as simpile as "m4 sendmail.mc > sendmail.cf". You should read the READMEs if this doesn't work. (I don't know where you should get the READMEs, I got them cuz i downloaded the source and compiled it myself)

After you have a new .cf file, (making sure it is the same name as the one you had before) and restart sendmail. Have fun

mule 09-01-2003 01:13 AM

:-) thanks a lot, helped!!!


All times are GMT -5. The time now is 07:46 PM.