Blog dedicated to Oracle Applications (E-Business Suite) Technology; covers Apps Architecture, Administration and third party bolt-ons to Apps

Showing posts with label sendmail. Show all posts
Showing posts with label sendmail. Show all posts

Sunday, July 17, 2011

opendaemonsocket: daemon MTA-v6: server SMTP socket wedged

After installing a newly available build of Solaris 10, sendmail was disallowing connections from anything but localhost. We tried taking a diff between sendmail.cf of older build and the new sendmail.cf and found that the old sendmail.cf had extra lines for DaemonPortOptions :

O DaemonPortOptions=Name=MTA-v4, Family=inet
O DaemonPortOptions=Name=MTA-v6, Family=inet6
O DaemonPortOptions=Port=587, Name=MSA, M=E

After including the DaemonPortOptions of MTA-v4 and MTA-v6, it started giving this error message:

opendaemonsocket: daemon MTA-v6: server SMTP socket wedged

So we removed the MTA-v6 line, and the above error stopped coming. Meanwhile I had googled this error and found this post on OpenSolaris forms. Based on the information, I reasoned that changing the parameter to false would allow connections from other hosts:

svccfg -s sendmail setprop config/local_only=false
svcadm refresh sendmail
svcadm restart sendmail

This worked perfectly fine. Since we don't use Solaris Zones, there was no need to use the pfexec command.

Wednesday, May 13, 2009

cannot open /etc/mail/local-host-names

Recently I added a new hostname to /etc/mail/local-host-names and bounced sendmail:

svcadm restart sendmail.

But sendmail didn't come up and started logging these errors in /var/adm/messages:

May 13 14:21:50 mailserver1 sendmail[19725]: [ID 801593 mail.crit] NOQUEUE: SYSERR(root): /etc/mail/sendmail.cf: line 80: fileclass: cannot open '/etc/mail/loca
l-host-names': Group writable directory
May 13 14:21:50 mailserver1 sendmail[19725]: [ID 801593 mail.crit] NOQUEUE: SYSERR(root): /etc/mail/sendmail.cf: line 561: fileclass: cannot open '/etc/mail/tru
sted-users': Group writable directory


We engaged unix team and they did something and the error changed to:

May 13 14:33:38 tsgp1403 sendmail[13585]: [ID 801593 mail.alert] n4DHe0KO027983: queueup: cannot create ./tfn4DHe0KO027983, uid=25: File exists
May 13 14:35:34 tsgp1403 sendmail[15873]: [ID 801593 mail.alert] n4DHe0KO027983: queueup: cannot create ./tfn4DHe0KO027983, uid=25: File exists
May 13 14:35:35 tsgp1403 sendmail[15916]: [ID 801593 mail.alert] n4DHe0KO027983: queueup: cannot create ./tfn4DHe0KO027983, uid=25: File exists

Finally they realized that the permissions of /etc were set to 775. Once they changed it, sendmail started.

In a different article on oreillynet, I found the information that sendmail won't work properly if permissions are incorrect on any of these directories:

You have to check the permissions on / and all the subdirectories like /etc, /etc/mail for write permissions. If there is no write permission on / or /etc then give the write permissions and check.

This will set the permissions for every directory sendmail needs to be
non-group writable:

sudo chmod go-w / /etc /etc/mail /usr /var /var/spool /var/spool/mqueue /private

Check all these permissions are same as below.

drwxr-xr-x 45 root sys 3584 Feb 3 10:24 etc
drwxr-xr-x 2 root mail 512 Feb 3 11:54 mail
-rw-r--r-- 1 root bin 153 Sep 30 10:24 Mail.rc
-rw-r--r-- 1 root bin 1201 Sep 30 10:24 aliases
-rw-r--r-- 1 root mail 0 Oct 10 04:58 aliases.dir
-rw-r--r-- 1 root mail 1024 Oct 10 04:58 aliases.pag
-rw-r--r-- 1 root bin 5266 Sep 27 19:07 helpfile
-rw-r--r-- 1 root bin 0 Sep 24 2001 local-host-names
-rw-r--r-- 1 root bin 1829 Sep 30 10:19 mailx.rc
-r--r--r-- 1 root bin 34924 Sep 30 10:24 main.cf
-r--r--r-- 1 root bin 35625 Oct 1 05:09 sendmail.cf
-r--r--r-- 1 root other 35625 Oct 1 05:09
sendmail.cf.pre110615-05
lrwxrwxrwx 1 root root 8 Sep 30 10:24 sendmail.hf ->
helpfile
-r--r--r-- 1 root bin 35625 Sep 30 10:24 subsidiary.cf
-rw-r--r-- 1 root bin 5 Sep 24 2001 trusted-users

Friday, March 6, 2009

Relaying denied revisited

Recently I was called about complaints of workflow mailer failing to send outgoing mails, after the database server failed over. We use the sendmail daemon of the database server as the mail server. On checking the /etc/hosts file of the server, I found that it did not have the entries for the application tier servers. Sendmail always checks if a host which is trying to send mail is present in the mail server's /etc/hosts file. After adding the servers, relaying denied was resloved.

As discussed in a previous post, Sendmail does these checks:

1. Checks whether the host trying to send mail is in /etc/hosts
2. Does a reverse DNS lookup on the IP of the host trying to send mail, to see if the name is same as that reported by the host. For example if the host reports its name as appserver.justanexample.com (based on /etc/hosts of mail server), but a reverse DNS lookup shows that the name of the server is appserver.dev.justanexample.com, then Sendmail will reject it with Relay Denied error

Thursday, September 13, 2007

How to start sendmail(SMTP) and IMAP on Solaris 10

Short answer:

For SMTP(Sendmail):

Login as root
/lib/svc/method/smtp-sendmail start

or

svcadm restart sendmail

For activating IMAP:

1. Download imap package from ftp://ftp.sunfreeware.com/pub/freeware/sparc/10/imap-2006e-sol10-sparc-local.gz

2. # gunzip imap-2006e-sol10-sparc-local.gz
3. # pkgadd -d imap-2006e-sol10-sparc-local
4. # update file /etc/inetd.conf with the proper lines pointing to imapd and ipop3d:

imap stream tcp nowait root /usr/local/sbin/imapd imapd
pop2 stream tcp nowait root /usr/local/sbin/ipop2d ipop2d
pop3 stream tcp nowait root /usr/local/sbin/ipop3d ipop3d

5. # inetconv
6. # inetadm (to verify the services)

Commands to restart IMAP on Solaris 10

Login as root

# svcs -a |grep imap
online Feb_15 svc:/network/imap/tcp:default
# svcadm restart svc:/network/imap/tcp:default
# svcs -a |grep imap
online 22:07:24 svc:/network/imap/tcp:default
#