LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-11-2003, 06:48 AM   #1
chamkila
Member
 
Registered: Nov 2001
Distribution: Redhat 7.3 Slackware 8.1
Posts: 87

Rep: Reputation: 15
sendmail not getting mail


I have configured sendmail, but the problem I am having is that people are unable to send me mail.

I am able to send mail to any one like someone@mail.com, but if some trys to relpy back to me or send a new mail to me the email bounces.

What will I need to do to sort out this problem???

Also I am unable to get my mail client to use my smtp server.

Port 25 is opened on my router.

Thanks

Last edited by chamkila; 08-11-2003 at 06:58 AM.
 
Old 08-11-2003, 08:56 AM   #2
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
Sendmail only sends mail. Perhaps you need to fetchmail to get your email.

# Common e-mail tools
sendmail - postfix - sends mail to local users (and internet when configured correctly)
fetchmail - gets mail from internet accounts (non-Hotmail type)
procmail - sorts and delivers into separate mailboxes
mutt - mail client that sucks less than all the others
Email the Linux Way
Suresh Ramasubramanian's email guide
The Linux Mail User HOWTO
The Linux Electronic Mail Administrator HOWTO
SquirrelMail web mail
Why use Hotmail when there is LinuxMail?
Gotmail, a utility to download mail from Hotmail type accounts
 
Old 08-11-2003, 09:28 AM   #3
chamkila
Member
 
Registered: Nov 2001
Distribution: Redhat 7.3 Slackware 8.1
Posts: 87

Original Poster
Rep: Reputation: 15
Thanks, I will have a look at fetchmail. One thing how come my mail clients are unable to connect to my smtp server.

So I will need sendmail to send outgoing mail, then fetchmail to get the mail from internet address. Then a pop3 server to view mail in a mail client.
Is that right???


Thanks again
 
Old 08-11-2003, 09:45 AM   #4
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
Quote:
Originally posted by chamkila
Thanks, I will have a look at fetchmail. One thing how come my mail clients are unable to connect to my smtp server.

So I will need sendmail to send outgoing mail, then fetchmail to get the mail from internet address. Then a pop3 server to view mail in a mail client.
Is that right???


Thanks again
I would guess that would depend upon your entire setup.

I set mine up in 1999, so if I remember correctly (the links should better better rememberers than I have):
sendmail will send mail to the internet and local accounts.
fetchmail will fetch mail from internet accounts and put into /var/spool/mail/<user>
procmail can take the mail in /var/spool/<user> and sort and deliver into specific mailboxes.
A mail client can access the user mail spool and their local mailboxes.
A pop3 server would allow some fetchmail service to access your mail over the internet.
 
Old 08-11-2003, 10:10 AM   #5
Mpemba Effect
LQ Newbie
 
Registered: May 2003
Posts: 1

Rep: Reputation: 0
Thumbs up

If the mail is for your domain all mail will be routed to your machine (as set in your MX records), sendmail should recieve the mail and deliver it locally. You won't need fetchmail. Obviously you don't have a problem sending mail, but check you mail logs for anything coming in and being refused. Also post up your sendmail.cf maybe someone can spot something
 
Old 08-12-2003, 02:17 AM   #6
sanjibgupta
Member
 
Registered: Apr 2003
Location: Kolkata
Posts: 215

Rep: Reputation: 30
i am also facing this problem of not getting mail hwo do i rectify it.
 
Old 08-12-2003, 03:16 AM   #7
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
Quote:
Originally posted by fancypiper
Sendmail only sends mail. Perhaps you need to fetchmail to get your email.


no no no no no this is wrong.


sendmail recieves mail on port 25 (the default SMTP port).

The issue is with the sendmail.mc file. There is a line that has to be changed to allow sendmail to recieve mail over the internet. In the file itself it acually says "uncomment this line if you want sendmail to recieve mail over the internet" is has an ip address in it "127.0.0.1", you have to either change that ip or comment out the line...i think i just changed the ip...dont really remember.

when u edit the sendmail.mc file you have to run the m4 command to generate a new sendmail.cf file.

Code:
#m4 sendmail.mc > sendmail.cf
make sure u backup your old sendmail.cf before replacing it with a new one just incase u mess something up.
 
Old 08-12-2003, 05:11 AM   #8
chamkila
Member
 
Registered: Nov 2001
Distribution: Redhat 7.3 Slackware 8.1
Posts: 87

Original Poster
Rep: Reputation: 15
Thanks guys..

OK I can recived mail from the internet but the mail is not going in /var/spool/mail/username the mail is getting queued up in /var/spool/mqueue

my log file show this

Aug 12 12:26:23 node sendmail[19896]: h7CBQNcJ019896: from=<www@ISP.net>, size=828, class=0, nrcpts=1, msgid=<1060682466.3f38bae26415b@ISP.net>, proto=ESMTP, daemon=MTA, relay=i-ISP.net [194.106.56.146]
Aug 12 12:26:23 node sendmail[19896]: h7CBQNcJ019896: to=<username@mydomain.com>, delay=00:00:00, mailer=local, pri=30715, stat=queued

heres my linux.mc file

divert(0)dnl
VERSIONID(`$Id: generic-linux.mc,v 8.1 2003/08/01 22:48:05 gshapiro Exp $')
OSTYPE(linux)dnl
DOMAIN(mydomain.com)dnl
FEATURE(nouucp, reject)dnl
FEATURE(local_procmail)dnl
FEATURE(relay_entire_domain)dnl
MAILER(procmail)dnl
MAILER(smtp)dnl

I have procmail install and to put all the mail in /var/spool/mail. here my procmailrc, the file is it /etc

VERBOSE=off
LOGABSTRACT=yes
LOGFILE=/var/log/procmail.log
COMSAT=no
MAILDIR=/var/spool/mail

I was unable to find any good docs on procmail, so could some please help me out with procmail, how the hell do you run it. Yes I did read the man pages.


Thanks again
 
Old 08-12-2003, 05:25 AM   #9
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
honestly man, i dont know jack about senmail config files. i installed sendmail as it came with rh7.3, got the updated rpm from the rhn site, installed it, ran sendmail and i could send mail bout couldnt recieve it.

looked at the sendmail.mc file because looking at sendmail.cf is pointless as it is generated from sendmail.mc and sendmail.mc is easier to read, i saw that 1 line and changed it and also changed the bottom line to match my domain name ( i purchased one).

then it worked. procmail did its job and everything worked fine. even got imap to work with imp to give my server webmail capabilities (really nice stuff written in php).

i see your's says user@mydomain.com

also, make sure you arent running an open mail relay, sendmail is set up by default to not allow relaying. if you have an open mail relay, spammers will use your box to relay email to others all over the place and you box will be bogged down sending email out to unwated victims and u could get put on that spammer list. you can actually see these attempts in the log file.

basically im saying this: sendmail isnt hard to setup if you installed it with rh7.3, all u gotta do is edit like 2 lines in the sendmail.cf file, 3 tops and generate the new sendmail.cf

anything past that and i myself am lost.
 
Old 08-12-2003, 05:27 AM   #10
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
oh, i also used webmin to configure my servers now for convienence (but i still try to understand it the hard way and often look at the config files because i dont trust everything.)

http://webmin.com

using that is actually how i found out to change the line to get sendmail to recieve email because i would have never looked at the sendmail.mc file if i had not installed webmin.
 
Old 08-12-2003, 05:31 AM   #11
chamkila
Member
 
Registered: Nov 2001
Distribution: Redhat 7.3 Slackware 8.1
Posts: 87

Original Poster
Rep: Reputation: 15
How did you run procmail?? did it run as a daemon if so how. How is your procmailrc configured. Does my sendmail.mc file look ok.

Thanks
 
Old 05-17-2004, 09:47 PM   #12
tbeehler
Member
 
Registered: Aug 2003
Location: Washington State, USA
Distribution: Mainly RH 9.0
Posts: 227

Rep: Reputation: 30
Have you tried turning on the ipop3 daemon? if you do a "chkconfig --list" it might show you a listing for ipop3 if imap is installed. To turn it on just type in "chkconfig --level 35 ipop3 on" and it should work for you. I had the exact same problem and once I did that command, I was able to get mail. I don't know what the --level 35 part of the command does, but it was pointed out to me by someone here and I thought I should include it. Anyways, I hope that helps you out! Also, make sure that your firewall is set so you can have pop3 traffic going through it.

Travis Beehler
 
  


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
How to make Sendmail forward all incoming mail to localhost port 26 (Domino mail) speedgelb Linux - Software 3 09-27-2013 10:18 AM
Using sendmail to relay mail to ISP mail server Swift&Smart Linux - Software 26 11-09-2008 03:00 PM
Sendmail Not Show Mail in Inbox (Evalution Mail) skanand Linux - Networking 1 05-11-2005 12:22 AM
sendmail error Fetching mail could not lock /var/spool/mail/username sukhdev50 Linux - Networking 0 05-04-2005 03:41 AM
Sendmail - RunAsUser=sendmail:mail/What files to i have to change ForumKid Linux - Security 45 01-18-2002 11:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:09 PM.

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