# Sendmail Send Problem



## tomdean (Dec 19, 2011)

FreeBSD 9.0(RC2)
mail.speakeasy.org is my mail server and ISP.
I connect to the net via wavecable with a cable modem.
I can send mail from Windows 7 or Ubuntu.
I have a <host>.mc that worked when I was directly connected to speakeasy.
I made some changes in attempting to get this working.  Here it is, without comments.

```
#  cat P9X79.tddhome.mc | sed -e'/^dnl/d' -e'/^$/d' -e'/^#/d'
divert(-1)
divert(0)
VERSIONID(`$FreeBSD: src/etc/sendmail/freebsd.mc,v 1.39.2.1 2011/09/23 00:51:37 kensmith Exp $')
OSTYPE(freebsd6)
DOMAIN(generic)
FEATURE(access_db, `hash -o -T<TMPF> /etc/mail/access')
FEATURE(blacklist_recipients)
FEATURE(local_lmtp)
FEATURE(mailertable, `hash -o /etc/mail/mailertable')
FEATURE(virtusertable, `hash -o /etc/mail/virtusertable')
FEATURE(masquerade_envelope)dnl
FEATURE(genericstable, `hash -o /etc/mail/genericstable')dnl
define(`confAUTH_MECHANISMS', `LOGIN PLAIN')dnl
define(`SMART_HOST', `mail.speakeasy.org:587')
MASQUERADE_AS(`mail.speakeasy.org')dnl
MASQUERADE_DOMAIN(`tddhome')dnl
define(`confAUTH_OPTIONS', `A')dnl
define(`confAUTH_MECHANISMS', `LOGIN PLAIN')dnl
TRUST_AUTH_MECH(`LOGIN PLAIN')dnl
define(`confCW_FILE', `-o /etc/mail/local-host-names')
DAEMON_OPTIONS(`Name=IPv4, Family=inet')
DAEMON_OPTIONS(`Name=IPv6, Family=inet6, Modifiers=O')
define(`confBIND_OPTS', `WorkAroundBrokenAAAA')
define(`confNO_RCPT_ACTION', `add-to-undisclosed')
define(`confPRIVACY_FLAGS', `authwarnings,noexpn,novrfy')
MAILER(local)
MAILER(smtp)
```


```
# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 P9X79.tddhome ESMTP Sendmail 8.14.5/8.14.5; Mon, 19 Dec 2011 13:57:03 -0800 (PST)
ehlo localhost
250-P9X79.tddhome Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH LOGIN PLAIN
250-DELIVERBY
250 HELP
quit
```

When I attempt to send mail (either with mail or emacs RMAIL), it is returned, 


```
553 sorry, your mailserver [24.113.112.30] is rejected by See http://www.sorbs.net
```

What am I doing wrong?

tomdean


----------



## DutchDaemon (Dec 19, 2011)

It looks like the mailserver you're trying to relay mail through does not see you as their client, so it treats you for what you are: someone trying to send mail from a domestic cable connection. Any mail admin worth his pay will not allow that. Seeing that you're using the non-blocked port 587 instead of the usually-blocked port 25, it is clear to me that you're sending email outside of your own ISP's network. So either use your own ISP's (i.e. Wave Broadband's) SMTP server (which can probably be reached on the standard port 25), or ask Speakeasy if they actually support authenticated SMTP. It seems you're trying to use it, but does Speakeasy allow it, and allow it on port 587?


----------



## tomdean (Dec 19, 2011)

I can send email through this same connection from either Windows 7 or Ubuntu 11.04.  I have 3 machines and a router connected via a wavecable modem.  The other two machines are running Windows 7 and Ubuntu, respectively.

I have an account with speakeasy, and have had for about 15 years.  This is the only account I use for email.

I can send/receive email from either of the other two machines via speakeasy.  Through the same router/cable modem I use from FreeBSD.  I have been using these other two machines for more than a year.  Both these machines use port 587.

So, it MUST be some booga-boo in my sendmail configuration.

tomdean


----------



## DutchDaemon (Dec 19, 2011)

Is this FreeBSD machine a server, or does it also run X? If so, try configuring your mail relay using an SMTP client like Thunderbird. If something is wrong with your AUTH-SMTP setup, your maillog should show more than just the rejection based on your source IP address.


----------



## tomdean (Dec 20, 2011)

The FreeBSD machine is not a server.  I am posting this reply from it.
I can send/receive email from the FreeBSD machine using seamonkey.

So, my problem is with sendmail configuration.

tomdean


----------



## tomdean (Dec 20, 2011)

I have a hint.  The problem is not with 'delisting' or being unauthorized.

The problem is definitely with the sendmail configuration.

I have three machines behind a router, connected to the net via a wavecable modem.  My ISP is speakeasy.org.

```
192.168.2.7
FreeBSD 9.0(RC2) - I have been having problems with that machine.
                   but, it works with seamonkey

192.168.2.3
Windows 7        - works with windows mail.

192.168.2.2
Ubuntu           - works with evolution (also dual boot)
```
I rebooted the 192.168.2.2 to FreeBSD 8.2-stable.  It uses Sendmail 8.14.5/8.14.4. Sendmail worked from that machine. On the 192.168.2.7, FreeBSD 9.0(RC2) machine, I backed-up /etc/mail and deleted it.  Then, I copied the 192.168.2.2 /etc/mail to 192.168.2.7.

Now, sendmail works from 192.168.2.7.  So, changing ONLY the sendmail configuration fixed the problem.

It remains to discover which entry made the difference.

tomdean


----------



## wblock@ (Dec 20, 2011)

In post #1, you don't say where the 553 response came from.  But it's due to your system being from a pool of dynamic IP addresses.  Going to http://www.sorbs.net/lookup.shtml and entering that address shows that it is on the DUHL (Dynamic User and Host List).  Whoever sent the 553 is using that list to reject.

The difference between the working and nonworking configs is probably that the working one smarthosts through the local ISP's mail server.


----------



## tomdean (Dec 21, 2011)

Please read my post #6. The problem I had was with sendmail configuration. I changed the sendmail configuration and now sendmail works. Without error. The SORBS response was caused by mis-configuration of sendmail on my machine. This caused sendmail to smarthost through a mail server that was not my ISP's.

I still do not understand why it happened.  Code Rot?  Most likely, some problem happened when I did [cmd=]sudo make all install restart[/cmd] in /etc/mail. Maybe I missed some error message?

I *diff*'d the 'working' and 'failing' configurations and only saw comment differences, such as the VERSIONID.

I can now use either the 'failing' or the 'working' configuration and get a working sendmail.  I have repeated this three times with each configuration and no failures.

Thanks for the replies.


----------



## wblock@ (Dec 21, 2011)

Post #6 is not clear to me; MUAs can have their own smarthost settings.  Maybe the difference is that the initial error happened before any custom .mc was built at all.


----------



## amilojko (Jan 2, 2012)

You need to post the two mc files. In sendmail mc files the order of lines is sometimes important. What about site.config.m4? There are so many variables none of which you are presenting.


----------

