Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri Nov 21, 2014 5:58 am 
Offline
Newbie

Joined: Fri Nov 21, 2014 5:48 am
Posts: 2
Hi,
I'm having some problems with sendmail in Linux. The thing is when I type the following command to send an e-mail:

Code:
sendmail bartoszk@companydomain.pl< test.txt


it looks like it executed but I don't receive the mail. The file test.txt looks like that:

Code:
To: serwis@ubuntu-server.linux.companydomain.pl
Subject: Tests
From: serwis@linux.companydomain.pl

TestTestTestTestTest


Logs show something like that:
Code:
$.1.119], dsn=4.1.8, stat=Deferred: 450 4.1.8 <root@ubuntu-server.linux.companydomain.pl>: Sender address rejected: Domain not found


In the /etc/hosts there are following lines:

Code:
127.0.0.1  localhost  localhost.linux.companydomain.pl
127.0.1.1  rtnagios  rtnagios.companydomain.pl
127.0.1.1  ubuntu-server  ubuntu-server.linux.companydomain.pl
192.168.1.119  linux  linux.companydomain.pl
127.0.0.1  companydomain companydomain.pl

# The following lines are desirable for IPv6 capable hosts
#::1  ip6-localhost ip6-loopback
#fe00::0 ip6-localnet
#ff00::0 ip6-mcastprefix
#ff02::1 ip6-allnodes
#ff02::2 ip6-allrouters


The sendmail.mc file is:
Code:
DAEMON_OPTIONS(`Family=inet,  Name=MTA-v4, Port=smtp, Addr=127.0.0.1')dnl
dnl DAEMON_OPTIONS(`Family=inet6, Name=MSP-v6, Port=submission, M=Ea, Addr=::1')dnl
DAEMON_OPTIONS(`Family=inet,  Name=MSP-v4, Port=submission, M=Ea, Addr=127.0.0.1')dnl
dnl #
dnl # Be somewhat anal in what we allow
define(`confPRIVACY_FLAGS',dnl
`needmailhelo,needexpnhelo,needvrfyhelo,restrictqrun,restrictexpand,nobodyreturn,authwarnings')dnl
dnl #
dnl # Define connection throttling and window length
define(`confCONNECTION_RATE_THROTTLE', `15')dnl
define(`confCONNECTION_RATE_WINDOW_SIZE',`10m')dnl
dnl #
dnl # Features
dnl #
dnl # use /etc/mail/local-host-names
FEATURE(`use_cw_file')dnl
dnl #
dnl # The access db is the basis for most of sendmail's checking
FEATURE(`access_db', , `skip')dnl
dnl #
dnl # The greet_pause feature stops some automail bots - but check the
dnl # provided access db for details on excluding localhosts...
FEATURE(`greet_pause', `1000')dnl 1 seconds
dnl #
dnl # Delay_checks allows sender<->recipient checking
FEATURE(`delay_checks', `friend', `n')dnl
dnl #
dnl # If we get too many bad recipients, slow things down...
define(`confBAD_RCPT_THROTTLE',`3')dnl
dnl #
dnl # Stop connections that overflow our concurrent and time connection rates
FEATURE(`conncontrol', `nodelay', `terminate')dnl
FEATURE(`ratecontrol', `nodelay', `terminate')dnl
dnl #
dnl # If you're on a dialup link, you should enable this - so sendmail
dnl # will not bring up the link (it will queue mail for later)
dnl define(`confCON_EXPENSIVE',`True')dnl
dnl #
dnl # Dialup/LAN connection overrides
dnl #
include(`/etc/mail/m4/dialup.m4')dnl
include(`/etc/mail/m4/provider.m4')dnl
dnl #
define(`SMART_HOST',`companydomain.pl')dnl
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
FEATURE(`authinfo',`hash /etc/mail/auth/client-info')dnl
dnl # Default Mailer setup
MAILER_DEFINITIONS
MAILER(`smtp')dnl
dnl # Masquerading options


Sending mails via

Code:
sendmail -fserwis@linux.companydomain.pl bartoszk@companydomain.pl < test.txt


doesn't work either.

linux.companydomain.pl digged:
Code:
root@ubuntu-server:/home/companydomain# dig linux.companydomain.pl

; <<>> DiG 9.8.1-P1 <<>> linux.companydomain.pl
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2628
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;linux.companydomain.pl.  IN  A

;; ANSWER SECTION:
linux.companydomain.pl.  0  IN  A  192.168.1.119

;; Query time: 107 msec
;; SERVER: 8.8.4.4#53(8.8.4.4)
;; WHEN: Thu Nov 20 11:46:15 2014
;; MSG SIZE  rcvd: 49


The command:

Code:
grep -iw from /var/log/mail*


output:

wklej.to/Bbe0T (it's a link because the log file is far too long to paste it here)

What's interesting is the fact that there are no logs from 20th November. The question is: why? There should also be logs from 19th November, since I started struggling with sendmail on Wednesday. But there are not, which is strange. System date/time is set correctly, so the problem isn't there.

Another command:

Code:
ps -aux|egrep '(sendmail|syslog)'


gave that output:

Code:
[color=#FF0000][b]syslog[/b]  [/color]400  0.0  0.1 249476  2460 ?  Sl  Nov19  0:40 r[b][color=#FF0000]syslog[/color][/b]d -c5
root  1083  0.0  0.1 101612  2660 ?  Ss  Nov19  0:06 [b][color=#FF0000]sendmail[/color][/b]: MTA: accepting connections
support  31503  0.0  0.0  25096  1468 ?  S  Nov20  0:00 /usr/sbin/[b][color=#FF0000]sendmail [/color][/b]-i -FCronDaemon -oem support
support  33172  0.0  0.0  25096  1464 ?  S  00:15  0:00 /usr/sbin/[b][color=#FF0000]sendmail [/color][/b]-i -FCronDaemon -oem support
root  55914  0.0  0.0  10624  932 pts/0  S+  09:10  0:00 egrep --color=auto ([b][color=#FF0000]sendmail[/color][/b]|[b][color=#FF0000]syslog[/color][/b])


How can I fix it?


Top
   
PostPosted: Sun Nov 23, 2014 1:46 pm 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
Your first sendmail command should attempt delivery to whatever host handles mail for "companydomain.pl". This would be the MX target in DNS, or if one does not exist, the A record for "companydomain.pl".

That host apparently checks to make sure that a DNS entry exists for "ubuntu-server.linux.companydomain.pl", which is the domain part of the envelope sender address. If one does not exist, it temporarily rejects the message with "Deferred: 450 4.1.8 <root@ubuntu-server.linux.companydomain.pl>: Sender address rejected: Domain not found". The 450 error code indicates to the sending host that it should retry later.

However, it looks like you will need to do one of these for delivery to succeed:
* Create a DNS entry for ubuntu-server.linux.companydomain.pl
* Configure the receiving mail host for companydomain.pl so it does not require the envelope sender address domain to be in DNS


Top
   
PostPosted: Mon Nov 24, 2014 3:14 am 
Offline
Newbie

Joined: Fri Nov 21, 2014 5:48 am
Posts: 2
Vance wrote:
However, it looks like you will need to do one of these for delivery to succeed:
* Create a DNS entry for ubuntu-server.linux.companydomain.pl

It's already created, check the /etc/hosts I pasted in a first post.

Vance wrote:
* Configure the receiving mail host for companydomain.pl so it does not require the envelope sender address domain to be in DNS

Could you explain how to do it?


Top
   
PostPosted: Thu Nov 27, 2014 2:41 pm 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
bartoszk wrote:
Vance wrote:
However, it looks like you will need to do one of these for delivery to succeed:
* Create a DNS entry for ubuntu-server.linux.companydomain.pl

It's already created, check the /etc/hosts I pasted in a first post.


I imagine you need a real DNS entry, not one in /etc/hosts. We can't check since you haven't told us the actual domain you're using.

bartoszk wrote:
Vance wrote:
* Configure the receiving mail host for companydomain.pl so it does not require the envelope sender address domain to be in DNS

Could you explain how to do it?


Sorry, I'm not familiar with Sendmail; perhaps someone else can help with that.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group