LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Sending Emails (https://www.linuxquestions.org/questions/linux-general-1/sending-emails-434463/)

yos123 04-12-2006 09:07 AM

Sending Emails
 
Hello,

I have a server, let's call it xyz.com. The MX entry for xyz.com points to a 3rd party server, let's call it xyz-mail.com. From xyz.com, I have an application that sends out emails, sometimes to people like joe@xyz.com. All the emails are received pretty much, except ones going out to @xyz.com. It seems like the server looks locally for a user called joe (or whatever) rather than checking the MX entry and sending the email to the xyz-mail.com server.

The mail server I'm using is sendmail. Does anyone know a solution to my problem?

Thank you.

mikeyt_333 04-12-2006 09:56 AM

That sounds right, if you're running sendmail you need to set the SMART_HOST variable to tell it what to use for mailing:

define(`SMART_HOST',`your.smtp.com')

and then so it looks like those mails are coming from the appropriate domain and not that specific server, define the following:

MASQUERADE_AS(`your.domain')dnl

After you've defined these in /etc/mail/sendmail.mc make sure the sendmail-cf package is installed and run a "make -C /etc/mail" from within the /etc/mail directory, this rebuilds your sendmail.cf file. Restart your sendmail instance and you should be good to go. I'm not sure if this is the official way to accomplish what you're trying to do, but it's how I fixed it, hope it works for you!

Mike.


All times are GMT -5. The time now is 05:01 PM.