?
Solved

Override Sendmail server Return path   ( Centos, Sendmail)  (not windows server)

Posted on 2012-04-13
1
Medium Priority
?
887 Views
Last Modified: 2012-06-22
Hi
I know that From php , I can override the Return path of a mail server. but let me explain to you where is the problem :

We have Server A , which has Apache + sendmail + php
Server B , our mailserver(exim)


In Server A, i am using smarthost to forward all the email to Server B . (which is fine)

Now problem is : when sendmail is forwarding the email  From Server A to SErer B, its putting return path as domain.Companydomain.lan  

example :

 In server A , when its sending to Server b (smarthost) we get like this (sendmail log)

Apr 13 15:03:03 posrep sendmail[30599]: q3DE33pL030599: from=<daemon@posrep.domain.lan>, size=403, class=0, nrcpts=1, msgid=<201204131403.q3DE33gJ030596@posrep.domain.lan>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]

Apr 13 15:03:04 posrep sendmail[30601]: q3DE33pL030599: to=<mydoamin@gmail.com>, ctladdr=<daemon@posrep.domain.lan> (2/2), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=120403, relay=smarthost.domain.lan. [172.12.0.25], dsn=2.0.0, stat=Sent (OK id=1SIh5b-0004iC-T4)


When SErver B send email outside:

When Server B is receing email from Server A , its getting like this ..

2012-04-13 15:03:04 1SIh5c-0004iG-2L <= daemon@posrep.localdomain.lan H=posrep.localdomain.lan [192.0.0.xx] P=esmtp S=831 id=201204131403.q3DE33kT030602@posrep.localdomain.lan

and when SErber B is sending email outside world, its keeping the same return address which is : daemon@posrep.localdomain.lan

now my question is :
is there any way, to override some configuration in sendmail.mc
so that when it will sent , it will take Return path from php ??


note : I cant set the sendmail_from path in php.ini as sendmail from can be different email address, so no hardcoded ..

thanks
0
Comment
Question by:fosiul01
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 7

Accepted Solution

by:
designatedinitializer earned 1500 total points
ID: 37845199
I usually have no such problems simply because I don't use sendmail.
I use SMTP all the time.
Check out XMimeMail php class, for instance, which I've been using for a long time.
This way your email never gets lost in your lan, nor blocked by other mail servers.
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
In this video we show how to create an email address policy in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Mail Flow…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question