Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have sucessfully configured sendmail in my machine i.e RHEL 5.2 and I am able to sendmails within my box to all the users.
I am using smtp.gmail.com for my smtp server with ip address 192.168.0.195
But now I want to use this machine 192.168.0.195 to act as smtp server for my other linux client machines so that the clients can send mails to each other using this smtp server (192.168.0.195)
Please let me know what changes do I need to make and where to start from?
Dec 28 17:58:00 server sendmail[9815]: pBSCS0Ux009815: to=<root@server.example.com>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31548, dsn=2.0.0, stat=Sent
but the message is not received at the end.
If server.example.com is your sendmail server, you should look at its logs to see what happens. Perhaps it stays in queue because the server does not know where to deliver.
Quote:
Let me tell you the domain is not registered. Can you guide me how to register a domain to create my own smtp server?
what you mean by that? You can create a fake domain, using a private dns for you and your clients, or you need to register a real domain using a registrar.
Then you have to configure the dns server authoritative for that domain (could be yours or your registrars) and add a MX record that points to your mail server.
If server.example.com is your sendmail server, you should look at its logs to see what happens. Perhaps it stays in queue because the server does not know where to deliver.
The message output which I posted was from logs
Code:
/var/log/maillog
what you mean by that? You can create a fake domain, using a private dns for you and your clients, or you need to register a real domain using a registrar.
Then you have to configure the dns server authoritative for that domain (could be yours or your registrars) and add a MX record that points to your mail server.
I have configured one DNS server on 192.168.0.195 i.e server.estmail.com with MX record mail.estmail.com and the DNS server is running properly and my client is running on the same dns i.e 192.168.0.195
but still I am not getting positive output
Here is my forward zone file
Code:
#cat estmail.com.zone
$TTL 86400
@ IN SOA server.estmail.com. mail.estmail.com.root (
53 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS server.estmail.com.
IN MX 10 mail.estmail.com.
smtp In A 192.168.0.195
server IN A 192.168.0.195
www IN A 192.168.0.195
ftp IN A 192.168.0.195
Now when I send mail from client to 192.168.0.195 here is the log output
Code:
Dec 29 00:20:32 server sendmail[11443]: pBSIoWkr011441: to=<user1@server.estmail.com>, ctladdr=<root@server.example.com> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=120303, relay=smtp.estmail.com. [192.168.0.195], dsn=4.0.0, stat=Deferred: Connection refused by smtp.estmail.com.
on the server and client
Code:
#cat /etc/mail/access
# Check the /usr/share/doc/sendmail/README.cf file for a description
# of the format of this file. (search for access_db in that file)
# The /usr/share/doc/sendmail/README.cf is part of the sendmail-doc
# package.
#
# by default we allow relaying from localhost...
Connect:localhost.localdomain RELAY
Connect:localhost RELAY
Connect:127.0.0.1 RELAY
Connect:192.168.0.195 RELAY
Connect:10.10.10.98 RELAY <------- client machine(both are in network)
Can you tell me what all changes do I need to do in my sendmail.mc file to send mails from client to server
My server was not listeneing to port 587 and 465. I did some changes in sendmail.mc and now its listening to both the ports
Now when I send mails from client machine(10.10.10.98--server.example.com) to server this is the log output which I get
Code:
Dec 29 01:35:48 server sendmail[12465]: pBSK5mjH012465: to=<root@server.example.com>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31556, dsn=2.0.0, stat=Sent
But still I don't receive any message on 192.168.0.195(server.estmail.com)
I did some changes in zone file
Code:
$TTL 86400
@ IN SOA server.estmail.com. mail.estmail.com.root (
59 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS server.estmail.com.
IN MX 10 mail.estmail.com.
smtp In A 192.168.0.195
server IN A 192.168.0.195
www IN A 192.168.0.195
ftp IN A 192.168.0.195
mail.estmail.com. IN A 192.168.0.195
This is the return mail which I get
Code:
Date: Thu, 29 Dec 2011 01:35:48 +0530
From: Mail Delivery Subsystem <MAILER-DAEMON@server.example.com>
To: <root@server.example.com>
Subject: Returned mail: see transcript for details
Auto-Submitted: auto-generated (failure)
[-- Attachment #1 --]
[-- Type: text/plain, Encoding: 7bit, Size: 0.4K --]
The original message was received at Thu, 29 Dec 2011 01:35:48 +0530
from localhost.localdomain [127.0.0.1]
----- The following addresses had permanent fatal errors -----
<user1@server.estmail.com>
(reason: 530 5.7.0 Authentication required)
----- Transcript of session follows -----
... while talking to mail.estmail.com.:
>>> MAIL From:<root@server.example.com> SIZE=532
<<< 530 5.7.0 Authentication required
554 5.0.0 Service unavailable
[-- Attachment #2 --]
[-- Type: message/delivery-status, Encoding: 7bit, Size: 0.3K --]
Reporting-MTA: dns; server.example.com
Received-From-MTA: DNS; localhost.localdomain
Arrival-Date: Thu, 29 Dec 2011 01:35:48 +0530
So do you want me to change mail.estmail.com to smtp.estmail.com ???
So do you want me to change
mail.estmail.com to smtp.estmail.com ???
Now that you have given an A RR to mail.estmail.com it doesn't matter.
But in general, when someone sends an email to user@estmail.com, the 1st thing that is done, is to find the MX RR for that domain and then connect to that host in order to deliver the mail.
Quote:
(reason: 530 5.7.0 Authentication required)
Somehow you have configured sendmail to require authentication in order to relay mail.
If you have a backup of the sendmail.mc that came with your distro, it should work out of the box, with the only minor change:
Code:
DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl
because IIRC by default it listens only on the local loopback interface
Well I have end up with a result i.e I wont be able to send mails to other linux boxes as my domain is not registered even though they are using same DNS but I am able to send mails to gmail using my smtp server from all the client machines using the same smtp server.
I just mentioned this line in sendmail.mc
Code:
define(`SMART_HOST', `mail.estmail.com')dnl
where mail.estmail.com is MX record in my DNS zone file
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.