LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   sendmail: deliver every mail directly to the given smarthost (https://www.linuxquestions.org/questions/linux-networking-3/sendmail-deliver-every-mail-directly-to-the-given-smarthost-291438/)

TobyD 02-17-2005 11:58 AM

sendmail: deliver every mail directly to the given smarthost
 
Hi,

I'll forward all emails to a given smarthost:

from sendmail.mc:

define(`SMART_HOST', `my_smarthost')dnl

this works for all non local domains:

$sendmail -v -bv user@nonlocal.com
user@nonlocal.com... deliverable: mailer relay, host my_smarthost, user user@nonlocal.com

but if i send email to user@mydomani.com, then sendmail won't forward:

sendmail -v -bv user@mydomain.com
user@mydomain.com... User unknown

i've searched google for input, but i've not found a practicable sollution. ie:

define(`LOCAL_RELAY', `smtp:my_smarthost.')dnl
or
define(`MAIL_HUB', `smtp:my_smarthost.')dnl
of
define(`MAIL_HUB', `my_smarthost.')dnl

does not work. who can help me? which is the proper Option for sendmail.mc ?
Thanks in Advance
Tobias

ps. Fedora3, sendmail sendmail-8.13.1-2

scowles 02-17-2005 06:00 PM

Have you added "mydomain.com" to /etc/mail/local-host-names? This should fix your problem.

TobyD 02-17-2005 07:12 PM

hi,

i've soved this issue. Reason was wrong "Cw" ;)

Thanks
Toby

scowles 02-18-2005 05:52 AM

Quote:

Originally posted by TobyD
hi,

i've soved this issue. Reason was wrong "Cw" ;)

Glad you found your problem.

BTW: Since you are using FC3, the sendmail.mc file already enables "FEATURE(use_cw_file)dnl", so manually changing the value of class w (Cw) in sendmail.mc -or- adding hostsnames/domain names to the local-host-names file accomplish the same thing. From the sendmail README file:
Code:

use_cw_file    Read the file /etc/mail/local-host-names file to get
                alternate names for this host.  This might be used if you
                were on a host that MXed for a dynamic set of other hosts.
                If the set is static, just including the line "Cw<name1>
                <name2> ..." (where the names are fully qualified domain
                names) is probably superior.  The actual filename can be
                overridden by redefining confCW_FILE.



All times are GMT -5. The time now is 02:49 AM.