LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-21-2010, 10:38 AM   #1
knockout_artist
Member
 
Registered: Sep 2005
Distribution: fedora core 9
Posts: 324

Rep: Reputation: 33
sendmail not working.


Hi,

OS = debian

I have my laptop and desktop on same subnet.

From my laptop(FC11) I can send email from command line

Code:
echo  $HOSTNAME | mail -s test my@email.com
But from debian I can't.

I copied same sendmail.cf on both machines.

On debian it sort of hangs for a long time.

I there any way to diagnose the issue?

Thanks
 
Old 05-21-2010, 11:02 AM   #2
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 167Reputation: 167
on both machines try- 'echo $hostname | /usr/sbin/sendmail -v my@email.com' and compare the output and post it here, also what do your logs on the debian machine say and is sendmail actually currently running?
 
Old 05-21-2010, 12:04 PM   #3
knockout_artist
Member
 
Registered: Sep 2005
Distribution: fedora core 9
Posts: 324

Original Poster
Rep: Reputation: 33
This one works(FC)
Code:
@allegator ~]$ echo $HOSTNAME | /usr/sbin/sendmail -v my@email.com
WARNING: local host name (allegator) is not qualified; see cf/README: WHO AM I?
my@email.com... Connecting to [127.0.0.1] via relay...
220 allegator ESMTP Sendmail 8.14.3/8.13.8; Fri, 21 May 2010 12:56:40 -0400
>>> EHLO allegator
250-allegator Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH DIGEST-MD5 CRAM-MD5
250-DELIVERBY
250 HELP
>>> MAIL From:<champ@allegator> SIZE=10 AUTH=champ@allegator
250 2.1.0 <mp@allegator>... Sender ok
>>> RCPT To:<my@email.com>
>>> DATA
250 2.1.5 <my@email.com>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 o4LGuedB006474 Message accepted for delivery
my@email.com... Sent (o4LGuedB006474 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 allegator closing connection
allegator ~]$
Broken one(Deb)::

Code:
test:~# echo $HOSTNAME | /usr/sbin/sendmail -v my@email.com


WARNING: local host name (test) is not qualified; see cf/README: WHO AM I?
my@email.com... Connecting to [127.0.0.1] via relay...
220 test ESMTP Sendmail 8.14.3/8.13.8; Fri, 21 May 2010 12:58:05 -0400
>>> EHLO test
250-test Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
>>> MAIL From:<root@test> SIZE=5
250 2.1.0 <root@test>... Sender ok
>>> RCPT To:<my@email.com>
>>> DATA
250 2.1.5 <my@email.com>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
421 4.3.0 collect: Cannot write ./dfo4LGw5VB008636 (bfcommit, uid=0, gid=107): Permission denied
>>> QUIT
my@email.com... Deferred: 421 4.3.0 collect: Cannot write ./dfo4LGw5VB008636 (bfcommit, uid=0, gid=107): Permission denied
Closing connection to [127.0.0.1]
test:~#

Last edited by knockout_artist; 05-21-2010 at 12:05 PM.
 
Old 05-21-2010, 12:14 PM   #4
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 167Reputation: 167
The problem is on the deferred line, the sendmail daemon doesn't have correct permissions to write to a directory that it needs.

Check /tmp, /var/tmp, /var/spool/mqueue, and /var/mail. Sendmail needs to be able to write to those locations (and it sounds silly but make sure /var or / isn't full)
 
Old 05-21-2010, 12:18 PM   #5
knockout_artist
Member
 
Registered: Sep 2005
Distribution: fedora core 9
Posts: 324

Original Poster
Rep: Reputation: 33
Code:
test:~# ls  -ld   /var/spool/mqueue
drwxr-s--- 2 smmta smmsp 4096 2010-05-19 06:37 /var/spool/mqueue
test:~# ls  -ld   /var/mail
drwxrwsrwt 2 root mail 4096 2010-05-16 06:25 /var/mail
test:~# ls  -ld   /var/tmp
drwxrwxrwt 2 root root 4096 2010-05-19 06:30 /var/tmp
test:~# df -h 
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda1              18G  4.3G   13G  26% /
tmpfs                 756M     0  756M   0% /lib/init/rw
udev                   10M  704K  9.4M   7% /dev
tmpfs                 756M     0  756M   0% /dev/shm

Every thing is mounted under / , so there is still space there.

Thanks.

Last edited by knockout_artist; 05-21-2010 at 12:22 PM.
 
Old 05-21-2010, 12:44 PM   #6
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 167Reputation: 167
What do you get when you 'cat /etc/group | grep 107'? and what are perms on /tmp?
 
Old 05-21-2010, 12:45 PM   #7
knockout_artist
Member
 
Registered: Sep 2005
Distribution: fedora core 9
Posts: 324

Original Poster
Rep: Reputation: 33
Code:
chmod 1777 /var/spool/mqueue
This fixed the problem.

But its still extremely slow compare to FC machine.
 
Old 05-21-2010, 12:54 PM   #8
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 167Reputation: 167
Slowness in sendmail I've found 9/10 times is related to dns. Check your resolv.conf settings and make sure your dns servers resolve both your local machine name and the names of machines connecting.
 
Old 06-03-2010, 10:03 AM   #9
knockout_artist
Member
 
Registered: Sep 2005
Distribution: fedora core 9
Posts: 324

Original Poster
Rep: Reputation: 33
Yes. dns had to be corrected.

Its working like a charm now, thanks your your helpl.
 
Old 06-03-2010, 10:37 AM   #10
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 167Reputation: 167
Excellent, no problem, glad it's working for you!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing port in sendmail, sendmail not working. flschou Linux - Newbie 4 01-16-2008 09:03 AM
Sendmail not working quite right kerinism1 Linux - Server 3 09-04-2007 11:50 AM
sendmail is not working & on $prompt the cmd sendmail hangs Pavan mahoorker Linux - Software 1 04-04-2006 03:57 PM
Help Getting Sendmail working Like I want it shilo Slackware 14 06-07-2004 01:34 PM
Sendmail not working at all. EL3CTRO Linux - Networking 13 05-03-2003 06:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration