Sendmail issue - missing logs, can't receive mails

Discussion in 'Installation/Configuration' started by bartoszk, Nov 21, 2014.

  1. bartoszk

    bartoszk New Member

    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
    Code:
    /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 mail 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
    Full path of my mail.log goes like this:
    Code:
    var/log/mail.log
    Here's the output of the
    Code:
    grep -iw from /var/log/mail*
    command: wklej.to/Bbe0T (it's a link because the log is a file with many rows - it's too long to paste it in a post)

    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 that's the day I started struggling with sendmail. But there are not, which is strange.
    System time and date are correct, so the poroblem is not there.

    The
    Code:
    df -h
    command gives the following output:
    Code:
    System plików  rozm. użyte dost. %uż. zamont. na
    /dev/sda1  29G  2,5G  26G  9% /
    udev  990M  4,0K  990M  1% /dev
    tmpfs  200M  580K  200M  1% /run
    none  5,0M  0  5,0M  0% /run/lock
    none  999M  0  999M  0% /run/shm
    The output of
    Code:
    ps -aux|egrep '(sendmail|syslog)'
    command is:
    Code:
    Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
    [B][COLOR="Red"]syslog[/COLOR][/B]  400  0.0  0.1 249476  2460 ?  Sl  Nov19  0:40 r[COLOR="Red"][B]syslog[/B][/COLOR]d -c5
    root  1083  0.0  0.1 101612  2660 ?  Ss  Nov19  0:06 [B][COLOR="Red"]sendmail[/COLOR][/B]: MTA: accepting connections
    support  31503  0.0  0.0  25096  1468 ?  S  Nov20  0:00 /usr/sbin/[B][COLOR="Red"]sendmail [/COLOR][/B]-i -FCronDaemon -oem support
    support  33172  0.0  0.0  25096  1464 ?  S  00:15  0:00 /usr/sbin/[COLOR="Red"][B]sendmail [/B][/COLOR]-i -FCronDaemon -oem support
    root  55914  0.0  0.0  10624  932 pts/0  S+  09:10  0:00 egrep --color=auto ([B][COLOR="Red"]sendmail[/COLOR][/B]|[COLOR="Red"][B]syslog[/B][/COLOR])
    How can I fix that problem?
     

Share This Page