LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Mail for CronJobs! (https://www.linuxquestions.org/questions/linux-newbie-8/mail-for-cronjobs-653713/)

honey bee 07-05-2008 05:50 AM

Mail for CronJobs!
 
Hello

I have assigned some cron jobs to my FC4 machine, if the mail is set for system user, it is delivered and if the mail is set for any outer domain, it is not delivered.What can be the issue?

Tinkster 07-05-2008 08:54 PM

It's easiest to start looking at the logs of your mailer. Chances
are that the intended recipient rejects mail from machines w/o an
official MX record. I would/do.


Cheers,
Tink

Mr. C. 07-06-2008 12:48 AM

Or the MTA is configured for local-only delivery. Recollection tells me this was standard in RH & Fedora distros. But I dont' know which MTA you are using. Postfix or Sendmail?

trickykid 07-06-2008 08:56 AM

Quote:

Originally Posted by Mr. C. (Post 3205306)
Or the MTA is configured for local-only delivery. Recollection tells me this was standard in RH & Fedora distros. But I dont' know which MTA you are using. Postfix or Sendmail?

If it's Red Hat or Fedora, by default it should be sendmail unless they've specified postfix or another MTA.

kenoshi 07-07-2008 01:32 PM

Quote:

Originally Posted by honey bee (Post 3204732)
Hello

I have assigned some cron jobs to my FC4 machine, if the mail is set for system user, it is delivered and if the mail is set for any outer domain, it is not delivered.What can be the issue?

If there is a dedicated mail server in your environment, with a public MX record, you should set up sendmail to forward mail to it. Make sure you talk to whoever the mail admin is to allow relaying from your machine.

If you are using this from home, find out what the public mx is for your ISP, and set that as the smart relay.

To forward emails to a smart relay, you can just hack DS macro in sendmail.cf, but the politically correct way to do this is to edit the sendmail.cm file, and change the line:

dnl define(`SMART_HOST', `smtp.your.provider')dnl

to

define(`SMART_HOST', `hostname_or_ip_address_of_mail_server')dnl

Save that, then run (example on CentOS):

m4 /etc/mail/sendmail.cf > /etc/mail/sendmail.cf

Then restart sendmail.

Hope this helps.


All times are GMT -5. The time now is 05:54 AM.