Dear Friends,
I been attempting to configure sendmail on a CentOS 5.4 system for some time now.
The objective is to be able to send mail to in-house Exchange 2010 email accounts as well as external addressees. Additionally I want to forward mail for local accounts such as "root" to an Exchange account.
I am using m4 to compile sendmail.mc and submit.mc. I am also using a SMART_HOST definition.
I have met my first two objectives. Unfortunately I can not forward to email aliases using the mail command, but "sendmail -Am root" works properly???
From what I understand, mail sent to the local address must use the MTA (mail transfer agent) to send the mail, and I have not correctly configured for that.
I also read that I can add an"F=A" flag to a mailer definition (but which one) or that a DAEMON_OPTIONS setting will allow for aliasing??
I must admit to being confused by this entire matter, that is why I am hoping someone on this list can advise me.
Best Regards,
Clem Taylor
Useful?? information follows...
[root@lxmv48 mail]# grep ^M sendmail.cf
Msmtp, P=[IPC], F=mDFMuX, S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP/HdrFromSMTP, E=\r\n, L=990,
Mesmtp, P=[IPC], F=mDFMuXa, S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP/HdrFromSMTP, E=\r\n, L=990,
Msmtp8, P=[IPC], F=mDFMuX8, S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP/HdrFromSMTP, E=\r\n, L=990,
Mdsmtp, P=[IPC], F=mDFMuXa%, S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP/HdrFromSMTP, E=\r\n, L=990,
Mrelay, P=[IPC], F=mDFMuXa8, S=EnvFromSMTP/HdrFromSMTP, R=MasqSMTP/MasqRelay, E=\r\n, L=2040,
Mprocmail, P=/usr/bin/procmail, F=DFMSPhnu9, S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP/HdrFromSMTP,
Mlocal, P=/usr/bin/procmail, F=lsDFMAw5:/|@qSPfhn9, S=EnvFromL/HdrFromL, R=EnvToL/HdrToL,
Mprog, P=/usr/sbin/smrsh, F=lsDFMoqeu9, S=EnvFromL/HdrFromL, R=EnvToL/HdrToL, D=$z:/,
[root@lxmv48 mail]# grep -v ^dnl sendmail.mc
divert(-1)dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`setup for linux')dnl
OSTYPE(`linux')dnl
define(`SMART_HOST', `hubmv01.corp.xyzcorpint.com')dnl
define(`confDEF_USER_ID', ``8:12'')dnl
define(`confTO_CONNECT', `1m')dnl
define(`confTRY_NULL_MX_LIST', `True')dnl
define(`confDONT_PROBE_INTERFACES', `True')dnl
define(`PROCMAIL_MAILER_PATH', `/usr/bin/procmail')dnl
define(`ALIAS_FILE', `/etc/mail/aliases')dnl
define(`STATUS_FILE', `/var/log/mail/statistics')dnl
define(`UUCP_MAILER_MAX', `2000000')dnl
define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
define(`confAUTH_OPTIONS', `A')dnl
TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
define(`confTO_IDENT', `0')dnl
FEATURE(delay_checks)dnl
FEATURE(`no_default_msa', `dnl')dnl
FEATURE(`smrsh', `/usr/sbin/smrsh')dnl
FEATURE(`mailertable', `hash -o /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable', `hash -o /etc/mail/virtusertable.db')dnl
FEATURE(redirect)dnl
FEATURE(always_add_domain)dnl
FEATURE(use_cw_file)dnl
FEATURE(use_ct_file)dnl
FEATURE(local_procmail, `', `procmail -t -Y -a $h -d $u')dnl
FEATURE(`access_db', `hash -T<TMPF> -o /etc/mail/access.db')dnl
FEATURE(`blacklist_recipients')dnl
DAEMON_OPTIONS(`Port=smtp,Name=MTA')dnl
DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea')dnl
FEATURE(`accept_unresolvable_domains')dnl
LOCAL_DOMAIN(`localhost.localdomain')dnl
MASQUERADE_AS(`xyzcorp.com')dnl
FEATURE(masquerade_envelope)dnl
FEATURE(allmasquerade)dnl
FEATURE(masquerade_entire_domain)dnl
MASQUERADE_DOMAIN(xyzcorp.com)dnl
MAILER(smtp)dnl
MAILER(procmail)dnl
[root@lxmv48 mail]# grep -v ^dnl submit.mc
divert(-1)
divert(0)dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`linux setup')dnl
define(`confCF_VERSION', `Submit')dnl
define(`__OSTYPE__',`')dnl dirty hack to keep proto.m4 from complaining
define(`_USE_DECNET_SYNTAX_', `1')dnl support DECnet
define(`confTIME_ZONE', `USE_TZ')dnl
define(`confDONT_INIT_GROUPS', `True')dnl
define(`confPID_FILE', `/var/run/sm-client.pid')dnl
FEATURE(`use_ct_file')dnl
define(`confDOMAIN_NAME', `xyzcorp.com')dnl
FEATURE(`msp', `hubmv01.corp.xyzcorpint.com')dnl
This works ....
[root@lxmv48 mail]# ( echo subject: test test test test; echo) | sendmail -Am -v root root... aliased to clement.taylor@xyzcorp.com clement.taylor@xyzcorp.com... Connecting to hubmv01.corp.xyzcorpint.com.
via relay...
220 HUBMV01.corp.xyzcorpint.com Microsoft ESMTP MAIL Service ready at Tue, 5 Jan 2010 18:04:03 -0500
>>> EHLO lxmv48.corp.xyzcorpint.com
250-HUBMV01.corp.xyzcorpint.com Hello [172.24.5.148] 250-SIZE 10485760 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-STARTTLS 250-AUTH 250-8BITMIME 250-BINARYMIME 250 CHUNKING
>>> STARTTLS
220 2.0.0 SMTP server ready
>>> EHLO lxmv48.corp.xyzcorpint.com
250-HUBMV01.corp.xyzcorpint.com Hello [172.24.5.148] 250-SIZE 10485760 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-AUTH 250-8BITMIME 250-BINARYMIME 250 CHUNKING
>>> MAIL From:<root@xyzcorp.com> SIZE=30
250 2.1.0 Sender OK
>>> RCPT To:<clement.taylor@xyzcorp.com>
>>> DATA
250 2.1.5 Recipient OK
354 Start mail input; end with <CRLF>.<CRLF>
>>> .
250 2.6.0 <201001052304.o05N44jd007077@lxmv48.corp.xyzcorpint.com>
[InternalId=2045] Queued mail for delivery clement.taylor@xyzcorp.com... Sent (<201001052304.o05N44jd007077@lxmv48.corp.xyzcorpint.com>
[InternalId=2045] Queued mail for delivery) Closing connection to hubmv01.corp.xyzcorpint.com.
>>> QUIT
221 2.0.0 Service closing transmission channel
This goes nowhere !!!!
[root@lxmv48 mail]# mail root
Subject: hello
hello
.
Cc:
[root@lxmv48 mail]#
I been attempting to configure sendmail on a CentOS 5.4 system for some time now.
The objective is to be able to send mail to in-house Exchange 2010 email accounts as well as external addressees. Additionally I want to forward mail for local accounts such as "root" to an Exchange account.
I am using m4 to compile sendmail.mc and submit.mc. I am also using a SMART_HOST definition.
I have met my first two objectives. Unfortunately I can not forward to email aliases using the mail command, but "sendmail -Am root" works properly???
From what I understand, mail sent to the local address must use the MTA (mail transfer agent) to send the mail, and I have not correctly configured for that.
I also read that I can add an"F=A" flag to a mailer definition (but which one) or that a DAEMON_OPTIONS setting will allow for aliasing??
I must admit to being confused by this entire matter, that is why I am hoping someone on this list can advise me.
Best Regards,
Clem Taylor
Useful?? information follows...
[root@lxmv48 mail]# grep ^M sendmail.cf
Msmtp, P=[IPC], F=mDFMuX, S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP/HdrFromSMTP, E=\r\n, L=990,
Mesmtp, P=[IPC], F=mDFMuXa, S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP/HdrFromSMTP, E=\r\n, L=990,
Msmtp8, P=[IPC], F=mDFMuX8, S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP/HdrFromSMTP, E=\r\n, L=990,
Mdsmtp, P=[IPC], F=mDFMuXa%, S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP/HdrFromSMTP, E=\r\n, L=990,
Mrelay, P=[IPC], F=mDFMuXa8, S=EnvFromSMTP/HdrFromSMTP, R=MasqSMTP/MasqRelay, E=\r\n, L=2040,
Mprocmail, P=/usr/bin/procmail, F=DFMSPhnu9, S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP/HdrFromSMTP,
Mlocal, P=/usr/bin/procmail, F=lsDFMAw5:/|@qSPfhn9, S=EnvFromL/HdrFromL, R=EnvToL/HdrToL,
Mprog, P=/usr/sbin/smrsh, F=lsDFMoqeu9, S=EnvFromL/HdrFromL, R=EnvToL/HdrToL, D=$z:/,
[root@lxmv48 mail]# grep -v ^dnl sendmail.mc
divert(-1)dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`setup for linux')dnl
OSTYPE(`linux')dnl
define(`SMART_HOST', `hubmv01.corp.xyzcorpint.com')dnl
define(`confDEF_USER_ID', ``8:12'')dnl
define(`confTO_CONNECT', `1m')dnl
define(`confTRY_NULL_MX_LIST', `True')dnl
define(`confDONT_PROBE_INTERFACES', `True')dnl
define(`PROCMAIL_MAILER_PATH', `/usr/bin/procmail')dnl
define(`ALIAS_FILE', `/etc/mail/aliases')dnl
define(`STATUS_FILE', `/var/log/mail/statistics')dnl
define(`UUCP_MAILER_MAX', `2000000')dnl
define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
define(`confAUTH_OPTIONS', `A')dnl
TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
define(`confTO_IDENT', `0')dnl
FEATURE(delay_checks)dnl
FEATURE(`no_default_msa', `dnl')dnl
FEATURE(`smrsh', `/usr/sbin/smrsh')dnl
FEATURE(`mailertable', `hash -o /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable', `hash -o /etc/mail/virtusertable.db')dnl
FEATURE(redirect)dnl
FEATURE(always_add_domain)dnl
FEATURE(use_cw_file)dnl
FEATURE(use_ct_file)dnl
FEATURE(local_procmail, `', `procmail -t -Y -a $h -d $u')dnl
FEATURE(`access_db', `hash -T<TMPF> -o /etc/mail/access.db')dnl
FEATURE(`blacklist_recipients')dnl
DAEMON_OPTIONS(`Port=smtp,Name=MTA')dnl
DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea')dnl
FEATURE(`accept_unresolvable_domains')dnl
LOCAL_DOMAIN(`localhost.localdomain')dnl
MASQUERADE_AS(`xyzcorp.com')dnl
FEATURE(masquerade_envelope)dnl
FEATURE(allmasquerade)dnl
FEATURE(masquerade_entire_domain)dnl
MASQUERADE_DOMAIN(xyzcorp.com)dnl
MAILER(smtp)dnl
MAILER(procmail)dnl
[root@lxmv48 mail]# grep -v ^dnl submit.mc
divert(-1)
divert(0)dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`linux setup')dnl
define(`confCF_VERSION', `Submit')dnl
define(`__OSTYPE__',`')dnl dirty hack to keep proto.m4 from complaining
define(`_USE_DECNET_SYNTAX_', `1')dnl support DECnet
define(`confTIME_ZONE', `USE_TZ')dnl
define(`confDONT_INIT_GROUPS', `True')dnl
define(`confPID_FILE', `/var/run/sm-client.pid')dnl
FEATURE(`use_ct_file')dnl
define(`confDOMAIN_NAME', `xyzcorp.com')dnl
FEATURE(`msp', `hubmv01.corp.xyzcorpint.com')dnl
This works ....
[root@lxmv48 mail]# ( echo subject: test test test test; echo) | sendmail -Am -v root root... aliased to clement.taylor@xyzcorp.com clement.taylor@xyzcorp.com... Connecting to hubmv01.corp.xyzcorpint.com.
via relay...
220 HUBMV01.corp.xyzcorpint.com Microsoft ESMTP MAIL Service ready at Tue, 5 Jan 2010 18:04:03 -0500
>>> EHLO lxmv48.corp.xyzcorpint.com
250-HUBMV01.corp.xyzcorpint.com Hello [172.24.5.148] 250-SIZE 10485760 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-STARTTLS 250-AUTH 250-8BITMIME 250-BINARYMIME 250 CHUNKING
>>> STARTTLS
220 2.0.0 SMTP server ready
>>> EHLO lxmv48.corp.xyzcorpint.com
250-HUBMV01.corp.xyzcorpint.com Hello [172.24.5.148] 250-SIZE 10485760 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-AUTH 250-8BITMIME 250-BINARYMIME 250 CHUNKING
>>> MAIL From:<root@xyzcorp.com> SIZE=30
250 2.1.0 Sender OK
>>> RCPT To:<clement.taylor@xyzcorp.com>
>>> DATA
250 2.1.5 Recipient OK
354 Start mail input; end with <CRLF>.<CRLF>
>>> .
250 2.6.0 <201001052304.o05N44jd007077@lxmv48.corp.xyzcorpint.com>
[InternalId=2045] Queued mail for delivery clement.taylor@xyzcorp.com... Sent (<201001052304.o05N44jd007077@lxmv48.corp.xyzcorpint.com>
[InternalId=2045] Queued mail for delivery) Closing connection to hubmv01.corp.xyzcorpint.com.
>>> QUIT
221 2.0.0 Service closing transmission channel
This goes nowhere !!!!
[root@lxmv48 mail]# mail root
Subject: hello
hello
.
Cc:
[root@lxmv48 mail]#