LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Can I auto-forward local msgs to an aliased exchange user from an smtp only client? (https://www.linuxquestions.org/questions/linux-server-73/can-i-auto-forward-local-msgs-to-an-aliased-exchange-user-from-an-smtp-only-client-777309/)

cgtaylor 12-21-2009 04:01 PM

Can I auto-forward local msgs to an aliased exchange user from an smtp only client?
 
I have configured my CentOS server to send email to our corporate exchange server smart_host. I used this article as a reference:
http://www.harker.com/sendmail/submit.html
It works great.

Below is my submit.mc file.
Now I'd like to be able to forward all internal mail messages to exchange id's using something like /etc/mail/aliases or /root/.forward

This is what happens when I try to send to root...

[CORP+ctaylor2@lxmv48 ctaylor2]$ mailx -v -s "hello root" root
Hello Mr. Root.
.
Cc:
root... Connecting to hubmv01.corp.cleminc.com. via relay...
220 HUBMV01.corp.vishayint.com Microsoft ESMTP MAIL Service ready at Mon, 21 Dec 2009 16:44:04 -0500
>>> EHLO lxmv48.corp.cleminc.com
250-HUBMV01.corp.clemeinc.com Hello [172.24.5.148]
... stuff..
>>> STARTTLS
220 2.0.0 SMTP server ready
>>> EHLO lxmv48.corp.cleminc.com
250-HUBMV01.corp.cleminc.com Hello [172.24.5.148]
..stuff..
>>> MAIL From:<CORP+ctaylor2@clem.com> SIZE=46
250 2.1.0 Sender OK
>>> RCPT To:<root@vishay.com>
>>> DATA
250 2.1.5 Recipient OK
354 Start mail input; end with <CRLF>.<CRLF>
>>> .
250 2.6.0 <200912212144.nBLLi4JD005109@lxmv48.corp.vishayint.com> [InternalId=900] Queued mail for delivery
root... Sent (<200912212144.nBLLi4JD005109@lxmv48.corp.vishayint.com> [InternalId=900] Queued mail for delivery)clemincvishayint.com.
>>> QUIT
221 2.0.0 Service closing transmission channel

tail -f /var/log/maillog

Dec 21 16:44:04 lxmv48 sendmail[5109]: nBLLi4JD005109: from=CORP+ctaylor2, size=46, class=0, nrcpts=1, msgid=<200912212144.nBLLi4JD005109@lxmv48.corp.cleminc.com>, relay=CORP+ctaylor2@localhost
Dec 21 16:44:04 lxmv48 sendmail[5109]: STARTTLS=client, relay=hubmv01.corp.cleminc.com., version=TLSv1/SSLv3, verify=FAIL, cipher=AES128-SHA, bits=128/128
Dec 21 16:44:05 lxmv48 sendmail[5109]: nBLLi4JD005109: to=root, delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30046, relay=hubmv01.corp.vishayint.com. [172.26.20.213], cleminc.com> [InternalId=900] Queued mail for delivery)

This goes straight to exchange, the .forward info is not referenced.
Exchange just /dev/nulls the mail. What to do?

I have spend a lot of time on the "google" trying to find some samples.
I am not running the daemon or procmail. Can someone point me in the right direction???

Regards,
Clem


[root@lxmv48 ~]# rpm -aq | grep sendmail
sendmail-doc-8.13.8-2.el5
sendmail-devel-8.13.8-2.el5
sendmail-cf-8.13.8-2.el5
sendmail-8.13.8-2.el5

[root@lxmv48 ~]# ps -fe | grep sendmail
smmsp 3966 1 0 15:34 ? 00:00:00 sendmail: Queue runner@00:30:00 for /var/spool/clientmqueue

[root@lxmv48 ~]# cat /etc/mail/submit.mc
divert(-1)
divert(0)dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`linux setup')dnl
define(`confCF_VERSION', `client')dnl
define(`__OSTYPE__',`')
define(`confTIME_ZONE', `USE_TZ')dnl
MASQUERADE_AS(`clem_inc.com')dnl
FEATURE(`allmasquerade')dnl
FEATURE(`masquerade_envelope')dnl
define(`SMART_HOST',`hubmv01.corp.clem_inc.com')dnl
define(`confMAX_MESSAGE_SIZE',`10000000')dnl
define(`confDONT_INIT_GROUPS', `True')dnl
define(`confDEF_USER_ID',``8:12'')dnl
define(`confDONT_PROBE_INTERFACES',true)dnl
define(`confTO_QUEUEWARN_DSN',`')dnl
define(`confTO_QUEUERETURN_DSN',`12h')dnl
FEATURE(`msp', `hubmv01.corp.clem_inc.com')dnl
dnl # LOCAL_USER(`root')dnl
EXPOSED_USER(`root')dnl

Here is the /etc/sysconfig/sendmail file...
DAEMON=no
QUEUE=
SMQUEUE=p1h


All times are GMT -5. The time now is 05:14 PM.