LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-30-2009, 11:21 AM   #1
another 1
Member
 
Registered: Nov 2008
Posts: 65

Rep: Reputation: 15
Question how to configure sendmail to just send emails. no recieving.


hi. i want to use the php to send emails via the function mail. this require configured mail server. i don't know how to configure the mail server. i choosed sendmail because it comes with the fedora package. i don't want full configuration (i don't want to recieve emails, just sending it), just the minimum to enable email sending.i couldn't understand the sendmail configuration.can you explain the configuration simply to me. i am not just new to servers stuff. iam new to linux.
the another question. does the sendmail support attachement (s/MIME).
(forgive my horrible english)
 
Old 03-30-2009, 03:09 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
The default configurations will do this for your local machine. If you don't want to receive email, don't open the service up to anything which could send email to you in the first place. if you want your system to relay email from other machines on your LAN you should just need to comment out a line reading "DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl" in the sendmail.mc file. other than that there's nothing to do. Note that "sending" and "receiving" are actually the same thing really, the two parts of a relay. if you want to send mail out to the net, then sendmail still has to receive a mail in the first place to forward it on somewhere.
 
Old 03-31-2009, 01:24 PM   #3
another 1
Member
 
Registered: Nov 2008
Posts: 65

Original Poster
Rep: Reputation: 15
thanks. but i have tried to send mails to my accounts in yahoo, google and hotmails and non of them received any message. the log messages show that the messages has been accepted for sending, but non of them received? what is the problem?
 
Old 03-31-2009, 01:54 PM   #4
Ghostwheel
Member
 
Registered: Jun 2004
Location: Mid Michigan
Distribution: CentOS, Ubuntu
Posts: 41

Rep: Reputation: 0
Quote:
Originally Posted by another 1 View Post
thanks. but i have tried to send mails to my accounts in yahoo, google and hotmails and non of them received any message. the log messages show that the messages has been accepted for sending, but non of them received? what is the problem?
I would check in this order:

1) Are you the MX for your domain? If not some servers will dump you as a spammer.

2) If yes on 1), are you set up with a reverse lookup (nslookup <your IP> -> <your domain>)? See above answer.

95% of your problems will be handled by the above. Especially to a major email host such as hotmail, gmail or yahoo.

Last edited by Ghostwheel; 03-31-2009 at 01:56 PM.
 
Old 03-31-2009, 04:57 PM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
if you are doing this on a home broadband line your ISP will probably have a mail relay you need to send all mail via in order to make it look respectable to other mail servers online. mail.myisp.com, smtp.myisp.net etc...
 
Old 04-03-2009, 04:05 AM   #6
another 1
Member
 
Registered: Nov 2008
Posts: 65

Original Poster
Rep: Reputation: 15
hi. i am trying to send mails using internet connection as you guessed, (idon't have a sitedomain yet). so you mean that i can't send mails unless that i have an a domain.
i managed to send mails to my lan members :-)
i don't know how to used these sites (smtp.myisp.net or mail.myisp.com) where should i put those adresses in sendmail.mc
thanks in advanced
 
Old 04-03-2009, 04:52 AM   #7
another 1
Member
 
Registered: Nov 2008
Posts: 65

Original Poster
Rep: Reputation: 15
i am sorry. i sent my self messages on my device using other device as the dns server. (the device act as the sender and the reciever at the same time), i thought that i can send the messages over the lan. but i couldn't
what is the problem?
i have commented the line as you said
Quote:
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
the sending successful sent messages are as follow
Quote:
echo "this is a test" | mail -s testsubject root@my-site.com
my device name according to the dns if my-site.com
but sending messages to other device is not working so
Quote:
echo "this is a test" | mail -s testsubject root@example.com
example is the other device name. any of the two devices can send itself messages using the its domain name (example and my-site)
??????????
 
Old 04-03-2009, 10:09 AM   #8
another 1
Member
 
Registered: Nov 2008
Posts: 65

Original Poster
Rep: Reputation: 15
i have just figured out that i was wrong. no message delivered using other domain name? why? i think the DNS configuration works well?
here is message i get when sinding using message using the commmand

# send mail -v khalid@my-site.com (my-site is my domain name in the lan. no internet connection)
Quote:
[root@localhost ~]# sendmail -v khalid@my-site.com.
this is the first message for me
.
khalid@my-site.com.... Connecting to [127.0.0.1] via relay...
220 localhost.localdomain ESMTP Sendmail 8.14.2/8.14.2; Fri, 3 Apr 2009 20:47:32 +0300
>>> EHLO localhost.localdomain
250-localhost.localdomain Hello localhost.localdomain [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:<root@localhost.localdomain> SIZE=33 AUTH=root@localhost.localdomain
250 2.1.0 <root@localhost.localdomain>... Sender ok
>>> RCPT To:<khalid@my-site.com>
>>> DATA
250 2.1.5 <khalid@my-site.com>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 n33HlWO2018703 Message accepted for delivery
khalid@my-site.com.... Sent (n33HlWO2018703 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 localhost.localdomain closing connection
please help me
 
Old 04-03-2009, 10:10 AM   #9
another 1
Member
 
Registered: Nov 2008
Posts: 65

Original Poster
Rep: Reputation: 15
all the messages i send go to /var/spool/mail/root why?
 
Old 04-03-2009, 10:31 AM   #10
another 1
Member
 
Registered: Nov 2008
Posts: 65

Original Poster
Rep: Reputation: 15
i have just noticed an interesting message
my-site.com [192.168.0.1] (may be forged) did not issue MAIL/EXPN/VRFY/ETRN ?????
 
  


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
Sendmail doesn't send emails Bodyweb Linux - Software 5 07-18-2006 08:53 AM
How do I send emails by PHP on FC3 (and configure the MTA)? murr4y Linux - Newbie 3 09-01-2005 04:20 PM
sendmail doesn't send emails outside dev_mohamed Linux - Networking 2 08-28-2005 03:42 PM
sending/recieving emails with sendmail xushi Slackware 2 02-25-2004 04:44 PM
How am I recieving blank emails? tarballedtux Linux - General 3 02-21-2004 10:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:32 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