Sendmail configuration help

Sendmail configuration help

Postby quinton » Wed Apr 12, 2006 5:00 pm

This site has a a really good explanation on how to set up and configure sendmail on a linux server.

http://www.linuxhomenetworking.com/linux-hn/sendmail.htm#_Toc109364450
quinton
Site Admin
 
Posts: 5
Joined: Tue Jan 31, 2006 11:54 am

sendmail.mc and sendmail.cf

Postby stephen » Mon Nov 20, 2006 5:12 pm

If sendmail-cf not install

Code: Select all
yum install sendmail-cf


# With the newly edited "sendmail.mc" file use make which will call the m4 (the sendmail macro burner) to create "sendmail.cf".

Code: Select all
cd /etc/mail
make


The make will call the m4 macro burner
Code: Select all
m4 sendmail.mc > sendmail.cf
stephen
 
Posts: 507
Joined: Thu Feb 09, 2006 9:37 am
Location: Brisbane

Sendmail configuration files

Postby stephen » Mon Jan 05, 2009 5:26 pm

sendmail files
This Linux Home Server site has some explanations of the sendmail configuration

http://www.brennan.id.au/12-Sendmail_Server.html

/etc/mail/access
add your subnet into the access file
# by default we allow relaying from localhost...
localhost.localdomain RELAY
localhost RELAY
127.0.0.1 RELAY
# allow relaying from local PC's
10.10.10 RELAY

cassy@xxx.com.au REJECT


/etc/mail/local-host-names
add your domain into the local-host-names file
# local-host-names - include all aliases for your machine here.
xxx.com.au
mail.xxx.com.au
http://www.xxx.com.au


/etc/mail/virtusertable
in the virtusertable show the mapping of the users email address to the local linux username


/etc/aliases
#
# Aliases in this file will NOT be expanded in the header from
# Mail, but WILL be visible over networks or from /bin/mail.
#
# >>>>>>>>>> The program "newaliases" must be run after
# >> NOTE >> this file is updated for any changes to
# >>>>>>>>>> show through to sendmail.
#

# Basic system aliases -- these MUST be present.
mailer-daemon: postmaster
postmaster: root

# General redirections for pseudo accounts.
bin: root
daemon: root
....
# Person who should get root's mail
# root: stephenx@xxx.com.au
macalias: mac, cassy

stephen
 
Posts: 507
Joined: Thu Feb 09, 2006 9:37 am
Location: Brisbane

Sendmail tips

Postby stephen » Fri Jan 09, 2009 6:33 am

This site http://networking.ringofsaturn.com/Unix/sendmailtips.php
has some helpful info as stated
This is a quick document on how to get yourself out of some binds I've run into with sendmail. These aren't going to be the most organized, but I figure someone else may find these useful.
stephen
 
Posts: 507
Joined: Thu Feb 09, 2006 9:37 am
Location: Brisbane

use mailq to determine why mail not delivered

Postby stephen » Fri Jan 09, 2009 7:43 am

When I send emails they end up in /var/spool/mqueue but are not delivered.

When I type mailq on the server terminal
it lists the mails as being deferred
eg
(host map: lookup (mydomain.com.au) : deferred)


my solution was to check the /etc/resolv.conf file
and make sure the first name server listed was the ip address of my mail server which is also my dns server.

nameserver 10.10.10.183


http://lists.freebsd.org/pipermail/freebsd-questions/2004-March/041322.html

If you have some specific jobs you'd
like to process in the queue, you can skip the rest of the queue processing and handle just those.

sendmail -v -qI {queue id substring}

or

sendmail -v -qS {sender address substring}

or

sendmail -v -qR {recipient address substring}

These variations will limit the processing to a sender address,
recipient, etc, in the queue.
stephen
 
Posts: 507
Joined: Thu Feb 09, 2006 9:37 am
Location: Brisbane

553: Sorry, that domain isn't in my list of allowed rcpthost

Postby stephen » Fri Jan 09, 2009 9:59 am

http://www.intermedia.net/support/kb/default.asp?id=899
When I try to send mail to a user on my local linux server called mydomain.com.au ,
an error is displayed in root's email
553: Sorry, that domain isn't in my list of allowed rcpthosts; 5.7.1


solution
edit sendmail.mc
add line
Code: Select all
MASQUERADE_AS(`mydomain.com.au')


save
then type
Code: Select all
make

then restart sendmail
Code: Select all
service sendmail restart


if sendmail-mc is not installed type
Code: Select all
yum install sendmail-mc
prior to make

I get an error that relay access is denied, the system is not configured to relay mail, or that the domain isn't in the list of allowed rcpthosts. Why?
stephen
 
Posts: 507
Joined: Thu Feb 09, 2006 9:37 am
Location: Brisbane


Return to Linux Server Configuration Notes

Who is online

Users browsing this forum: No registered users and 2 guests

cron