LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   RHEL4: Sendmail won't forward email (https://www.linuxquestions.org/questions/linux-server-73/rhel4-sendmail-wont-forward-email-603554/)

nogden 11-30-2007 12:59 PM

RHEL4: Sendmail won't forward email
 
I am having trouble with sendmail. I'm using RedHat Enterprise ES. My server needs to be able to accept mail for ocsnetwork.net, marysapparel.com, and ogdenscomputers.com. I have never set up sendmail before so I configured it as best as I could based on tutorials on the internet. When I send email to an address that I have configured in sendmail, the email is received on my server fine. If I send an email from my server to an outside address, the email goes through fine but has my local Linux username instead of what I have configured in genericstable. For example, if I log in as root and send an email to nelsonogden(at)gmail.com, I receive the email on my Gmail account, but it appears to have come from root(at)ocsnetwork.net, not admin(at)ocsnetwork.net. This is my first issue, but not the most important.

My main problem is that any email sent to an address on my server that needs to be forwarded to an outside account, won't forward. I never get an error email from the sending account and also don't get any messages on my server. The email also never arrives at the destination account. For example, if I send an email to nogden(at)ocsnetwork.net, I expect it to be redirected to nelsonogden(at)gmail.com. The other two addresses in my virtusertable work fine, but they are not forwarding email to an outside address. My config files are posted below. To keep this post shorter, I removed any lines from my sendmail.mc that were commented out.

My sendmail.mc:
Code:

divert(-1)dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`setup for Red Hat Linux')dnl
OSTYPE(`linux')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/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
define(`confTO_IDENT', `0')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(`virtusertable', `hash /etc/mail/virtusertable')dnl
FEATURE(`genericstable',`hash -o /etc/mail/genericstable.db')dnl
FEATURE(`genericstable', `hash /etc/mail/genericstable')dnl
FEATURE(redirect)dnl
FEATURE(always_add_domain)dnl
FEATURE(use_cw_file)dnl
FEATURE(use_ct_file)dnl
FEATURE(virtusertable)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
EXPOSED_USER(`root')dnl
LOCAL_DOMAIN(`ocsnetwork.net')dnl
MAILER(smtp)dnl
MAILER(procmail)dnl

My access:
Code:

localhost.localdomain          RELAY
localhost                      RELAY
127.0.0.1                      RELAY
ocsnetwork.net                  RELAY
marysapparel.com                RELAY

My genericstable:
Code:

nogden          nogden@ocsnetwork.net
root            admin@ocsnetwork.net

My local-host-names:
Code:

ocsnetwork.net
marysapparel.com
ogdenscomputers.com

My virtusertable:
Code:

nogden@ocsnetwork.net          nelsonogden@gmail.com
admin@ocsnetwork.net            root
info@marysapparel.com          nogden

Thanks for your assistance!


All times are GMT -5. The time now is 09:32 AM.