Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sendmail Config Question

Status
Not open for further replies.

sproosy

IS-IT--Management
Oct 31, 2002
94
AU
OK whats doin guys? I have just installed Sendmail 8.12.5/8.12.9 and Qpopper 4.03 on redHat 8.0. They both work fine i can send mail from a remote machien to people on the internet etc etc.
The problem is i have setup aliases like this:

first.name@domain.com: test

The files i have used are virtualusertable and aliases. I have been updating th db files and restarting sendmail. After all this if i send an email to first.name@domain.com it doesnt get qued locally, it dissapears. i have check /var/spool/mail and there are no qued maessages.


What have i done wrong?

Sproosy MCP

Keep it real!
 
Hi,

Have you check your /var/log/maillog file? Usually all attempts are logged. And have you try verbose mode.

feroz
 
When i check the logging this is all i get in /VAR/LOG/MAILLOG:

Sep 22 00:04:47 wolverine sendmail[638]: alias database /etc/aliases rebuilt by root
Sep 22 00:04:47 wolverine sendmail[638]: /etc/aliases: 62 aliases, longest 10 bytes, 599 bytes total
Sep 22 00:04:48 wolverine sendmail[649]: starting daemon (8.12.5): SMTP+queueing@01:00:00
Sep 22 00:04:48 wolverine sm-msp-queue[659]: starting daemon (8.12.5): queueing@01:00:00

How do i setup verbose mode?

Sproosy MCP

Keep it real!
 
Sproosy,

Add a "-v" to the line in whatever script starts sendmail. When you send a mail, do you see an entry in /var/log/maillog for the mail you sent?

Bluecrack
 
I added the script here, is this correct? im very good with scripts!

fi
daemon /usr/sbin/sendmail -bd -v $([ -n "$QUEUE" ] && echo -


Is this right it was out of /etc/init.d/

Cheeers


Sproosy MCP

Keep it real!
 
I fixed the logging problems, i forgot i was logging to another host. Sorry guys! Here is what the log says when i try to send a mail.

Sep 25 11:42:24 wolverine.smarthealth.com.au sendmail[4352]: h8O6f9MW004352: h8O6f9MX004352: DSN: User unknown
Sep 25 11:42:24 wolverine.smarthealth.com.au sendmail[4352]: h8O6f9MX004352: to=ryan.craig@smarthealth.com.au, delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=32176, relay=smarthealth.com.au, dsn=5.1.2, stat=Host unknown (Name server: smarthealth.com.au: no data known)
Sep 25 11:42:24 wolverine.smarthealth.com.au sendmail[4352]: h8O6f9MX004352: to=MAILER-DAEMON, delay=00:00:00, mailer=local, pri=32176, dsn=5.1.1, stat=User unknown
Sep 25 11:42:24 wolverine.smarthealth.com.au sendmail[4352]: h8O6f9MX004352: to=postmaster, delay=00:00:00, mailer=local, pri=32176, dsn=5.1.1, stat=User unknown
Sep 25 11:42:24 wolverine.smarthealth.com.au sendmail[4352]: h8O6f9MX004352: h8O6f9MY004352: return to sender: User unknown
Sep 25 11:42:24 wolverine.smarthealth.com.au sendmail[4352]: h8O6f9MY004352: to=MAILER-DAEMON, delay=00:00:00, mailer=local, pri=3200, dsn=5.1.1, stat=User unknown
Sep 25 11:42:24 wolverine.smarthealth.com.au sendmail[4352]: h8O6f9MX004352: Losing ./qfh8O6f9MX004352: savemail panic
Sep 25 11:42:24 wolverine.smarthealth.com.au sendmail[4352]: h8O6f9MX004352: SYSERR(root): savemail: cannot save rejected email anywhere
Sep 25 11:44:21 wolverine.smarthealth.com.au sendmail[4354]: h8O6h9MW004354: marvin.smarthealth.com.au [192.168.1.1] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA


Its really weird as i have an alias setup to direct all mail send to ryan.craig to a local account called ryan. WTF? why doesnt it work!

Cheeers

Sproosy MCP

Keep it real!
 
Is woloverine.smarthealth.com.au supposed to received all mail for users at smarthealth.com.au? It may be the way that sendmail is setup. I have a problem that may be related to this and I'm pretty sure my problem is just the way I designed the sendmail setup.


I have my sendmail.mc setup with the following:
MASQUERADE_AS(`company.com')dnl

And now I can't use virtusertable and alias for 'company.com'. This is fine for me for now because all mail is forwarded to an internal server anyway and sendmail just acts as a gateway for spam/virus filtering.

But I also have 'subdomain.company.com' setup to go to the sendmail server. 'subdomain.company.com' is setup using virtual-domains and virtusertable to forward to a seperate internal server.

Bluecrack
 
add this to your sendmail.mc file for testing this will send all mail for unknown users to this accout
define(`LUSER_RELAY',`local:acutalusename_on_system')dnl

I dont think this is it but maybe look for this and dnl it out or put the proper IP
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')


Is there really a colon after the usename@domain.com: test ?
remove colon.. tab seperated from LHS and RHS works ok for me

I'll check back after I see you looking into these. May already know and I on the wrong track But I tried
 
No there is not a colon, sorrry. I tried that option for the mc file, i now get the error: Sep 25 14:27:20 wolverine sendmail[8305]: h8P4RKro008305: SYSERR(root): mail.smarthealth.com.au. config error: mail loops back to me (MX problem?) I have binf running on the mail server, should i swucth it to another server?
Wolverine is a SMTP and POP3 server that does all our internal mail (well i hope it will do all internal mail). If it doesnt find an address that matches an alias it should forward all mail off to the web and it will go where it needs to go. After i tried the feature for the MC file i have been getting the same errors.

Very very weird or mabye im just missing something small? i dunno. Cheeer sguys!

Sproosy MCP

Keep it real!
 
I know the problem..But I can't remember how I fixed it.
Here's my sendmail.mc file from a loose server, not relay loose. Hope it came out ok in the cut/paste. your DNS server should be fine on the same machine. I have this one server running http,mail (pop,IMAP) router and DNS RH8.0 sendmail sendmail-8.12.8-5.80. This is the file from that server. Check to make sure you don't have redundant DNS in hosts file and in BIND, shouldn't matter but you might want to check it. I took some things out of this file and added some things, I did compile and try it though and it worked fine. Might be the aliases. Make sure the virtualusertable point to a valid user on the system not a list. Put the list wrapper in the /etc/aliases file and then point an email address to that like "admin: :include:/etc/mail/alias/admin" then put "jimmy@mydomain.com admin" I'm not sure if you can put an email add in the sendmail.mc file itself. Some more to try anyway
------------------------------
divert(-1)dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`setup for Red Hat Linux')dnl
OSTYPE(`linux')dnl
define(`LUSER_RELAY',`local:admin')dnl
define(`confDEF_USER_ID',``8:12'')dnl
define(`confTRUSTED_USER', `smmsp')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(`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
MD5 CRAM-MD5 LOGIN PLAIN')dnl
(`confSERVER_CERT',`/usr/share/ssl/certs/sendmail.pem')
(`confSERVER_KEY',`/usr/share/ssl/certs/sendmail.pem')
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(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')
FEATURE(`blacklist_recipients')dnl
EXPOSED_USER(`root')dnl
LOCAL_DOMAIN(`localhost.localdomain')dnl
MASQUERADE_DOMAIN(mydomain.com)dnl
MAILER(smtp)dnl
MAILER(procmail)dnl

----------------------------------
 
i fixed it!
It was as easy adding this to .mc file
Cwdomainnae.com

Thank god its over and working, Thanks for all you input and help dudes!


Cheeers!

Sproosy MCP

Keep it real!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top