Advertisement

01.29.2007 at 01:43PM PST, ID: 22141279
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.8

Sendmail smarthost relay

Asked by sbaylis in OpenBSD, SendMail Email Server, Simple Mail Transfer Protocol (SMTP)

Tags: , ,

Greetings,

Environment:

Two openbsd 4.0 server environment --  main.mail.server in DMZ, another in firewalled LAN.    firewall denies SMTP from LAN except to DMZ mail server.  
Sendmail  8.13.8 on both servers.   No issues sending mails from main DMZ mail server to any address.
I wish to blindly forward all emails sent from LAN server to the main DMZ server which will handle forwarding.

Server names and email addresses have been sanitized, but are correct in my environment.

Added

define(`SMART_HOST', `main.dmz.mailserver')dnl

to the LAN mailserver .mc file, generated cf and kill -HUP sendmail.

testing sending mail outside the network using

user@lan%   echo "test" | mail -v -s test external@address.com

and receive the following output:


external@address.com... Connecting to [127.0.0.1] via relay...
220 mail.lan.com ESMTP Sendmail 8.13.8/8.13.8; Mon, 29 Jan 2007 11:10:03 -0500 (EST)
>>> EHLO dmz.server.com
250-mail.lan.com hello localhost.lan.com [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-EXPN
250-VERB
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
>>> VERB
250 2.0.0 Verbose mode
>>> MAIL From:<user@mail.lan.com> SIZE=60
250 2.1.0 <user@mail.lan.com>... Sender ok
>>> RCPT To:<external@address.com>
>>> DATA
250 2.1.5 <external@address.com>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
050 <external@address.com>... Connecting to
mail.externaladdress.com. via esmtp...
050 <external@address.com>... Deferred: Connection refused by mail.externaladdress.com.
250 2.0.0 l0TGA3vP013035 Message accepted for delivery
external@address.com... Sent (l0TGA3vP013035 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 mail.lan.com closing connection




Apparantly, the mail.lan.com server attempts to deliver the mail directly,
which is forbidden by the firewall.  This places the mail in the sendmail
queue:


# sendmail -bp
                /var/spool/mqueue (2 requests)
-----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient-----------
l0TGA0IP016397        5 Mon Jan 29 11:10 <user@mail.lan.com>
                 (Deferred: Connection refused by mail.externaladdress.com.)
                                         <external@address.com>



When root issues a "sendmail -q" command, the mail is properly forwarded to
the main.dmz.mailserver and is delivered.  Where have I gone wrong?


Thanks,
Nick Pelfort


The following is my sendmail.mc file:

divert(0)dnl
OSTYPE(openbsd)dnl
FEATURE(`relay_local_from')
define(`SMART_HOST', `main.dmz.mailserver')dnl
MAILER(smtp)dnl


Start Free Trial
[+][-]01.29.2007 at 02:08PM PST, ID: 18423454

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.29.2007 at 02:28PM PST, ID: 18423574

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.30.2007 at 06:23AM PST, ID: 18427747

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.30.2007 at 06:53AM PST, ID: 18427994

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: OpenBSD, SendMail Email Server, Simple Mail Transfer Protocol (SMTP)
Tags: sendmail, smarthost, relay
Sign Up Now!
Solution Provided By: anfi
Participating Experts: 2
Solution Grade: A
 
 
[+][-]01.30.2007 at 07:13AM PST, ID: 18428177

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.30.2007 at 07:34AM PST, ID: 18428375

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081119-EE-VQP-49