2019-09-20 - hschneider, Admin
Cookie Disclaimer: This forum uses only essential, anonymous session cookies (xmailforum*), nothing to be scared of.
Printable Version of Topic
Click here to view this topic in its original format |
XMail Forum > Documentation and Knowledge Base > Undeliverable CRON mails |
Posted by: hschneider Feb 1 2004, 07:05 PM |
Mails sent by the cron daemon are undeliverable, because the recipient is 'root' without any domain specification. If you run XMail <1.17: - Start the crontab editor with 'crontab -e' - Add a line with your cron message recipient: 'MAILTO=user@your_domain.com' (your_domain.com has to be a valid XMail domain) - Exit the editor and restart the cron service. - For details see the crontab and cron manpages. If you run XMail >= 1.17: - Edit your XMail startupscript in /etc/init.d/rc-6/S90xmail (or a similar path) - Add this line after the line with MAIL_ROOT: DEFAULT_DOMAIN=mydomain - Enter an alias named "root" in your aliases.tab. |
Posted by: vegetto34 Apr 12 2004, 08:57 AM |
I'm still having problems. I have tried the following: DEFAULT_DOMAIN=mydomain then DEFAULT_DOMAIN=cchtml.com my real domain neither work In aliases.tab I tried: "*" [TAB] "root" [TAB] "webmaster@cchtml.com" "cchtml.com" [TAB] "root" [TAB] "webmaster@cchtml.com" "" [TAB] "root" [TAB] "webmaster@cchtml.com" none of those work either... I still get undelieverables. What have I done wrong? I can successfully send e-mail to root@cchtml.com which goes to the webmaster account as it should. |
Posted by: hschneider Apr 12 2004, 09:41 AM |
- What is your XMail version? - Did you restart XMail after these changes ? - Make sure, that DEFAULT_DOMAIN is exported correctly from your startup script. - Make sure, that you have modified the correct script, there can be multiple ones per runlevel. |
Posted by: vegetto34 Apr 12 2004, 08:57 PM |
xmail 1.18 I stop XMail, perform the changes, and restart xmail. I'm on RL 3... I'm not sure how to check these things on console. I can nagivate the file system, check processes, edit files, and do permissions... how do you check if it was exported? The only place I know where the start scripts are in are /etc/init.d On RH 9.0 |
Posted by: hschneider Apr 12 2004, 10:30 PM |
If you type 'set' on console, then it should be listed. The correct statement should be export DEFAULT_DOMAIN="domain.com" |
Posted by: vegetto34 Apr 12 2004, 11:09 PM |
That must have been it... it was not listed when I first ran "set." I then punched in the export command and DEFAULT_DOMAIN is now listed. I guess I'll see in 24 hours if it has fixed things. Thanks. |
Posted by: vegetto34 Apr 14 2004, 11:09 AM |
OK... something is wrong and I don't know what it is. I set the export line, but I reconnected and noticed it was gone! Like it was only valid for my SSL session... I've noticed if I change the /etc/init.d/xmail script that it also changes it in /etc/rc.d/rc3.d/S90xmail script... so what am I missing? I'm still getting the bounced messages because of no domain specification. |
Posted by: hschneider Apr 14 2004, 11:28 AM |
> ..it also changes it in /etc/rc.d/rc3.d/S90xmail script... If you do a ls -la /etc/rc.d/rc3.d then you'll see, that this is only a symlink to the original script. >I set the export line, but I reconnected and noticed it was gone! Pls enter the export statement in /etc/profile and check again. |
Posted by: vegetto34 Apr 14 2004, 01:36 PM |
OK, got that done... and it now shows up on set, except they still say "no domain" in the queue. Will it fix itself on the next cron run? |
Posted by: hschneider Apr 14 2004, 06:32 PM |
I hope so ... |
Posted by: vegetto34 Apr 15 2004, 02:56 PM |
Hm, if I run ./00-logwatch --mailto root@cchtml.com it sends it! Otherwise it still tries <root> and it sits in the queue on the default run. In the queue manager it will not give any diagnosis to the logwatch messages that are from "<>" and to "<root>" but they will sit there in queue. It will give "NODOMAIN_CRON" to messages from "<CronDaemon>" and to "<root>"... Have I screwed something up somewhere? heh |
Posted by: hschneider Apr 15 2004, 03:08 PM |
Please post me the SLOG of these messages without diagnosis. Do you have a user named root ? If not, you should add one to your aliases.tab. |
Posted by: vegetto34 Apr 16 2004, 01:58 AM | ||
Yes, look at my first post. I created a "root" alias. Did I do that wrong? It can successfully send e-mail to root@cchtml.com as I noted... and isn't it strange there is no "diagnosis" for the two e-mails in my screenshot? Here is the SLOG of one of the logwatch e-mails:
|
Posted by: hschneider Apr 16 2004, 08:07 AM |
Please post your server.tab and your XMail startup script. |
Posted by: vegetto34 Apr 16 2004, 10:33 AM | ||||
server.tab
I tried uncommenting "AllowNullSender" and that did nothing. xmail start-up script
I cannot send an e-mail to my server to "root" as it will spit an error saying check my forward address. |
Posted by: hschneider Apr 16 2004, 10:49 AM |
This needs to be export DEFAULT_DOMAIN="cchtml.com" instead of only DEFAULT_DOMAIN="cchtml.com" Pls restart XMail after changes. |
Posted by: vegetto34 Apr 16 2004, 10:57 AM |
Edited it and that didn't do anything. Flushed queue, unfroze queue... still stuck messages. DEFAULT_DOMAIN was already listed on "set" through the change in profile and it is still there on set. Do you know anyone else with RedHat 9 that's done this? It must have been something I did, whatever that was, because this seems like such a simple fix. |
Posted by: hschneider Apr 16 2004, 11:01 AM | ||
Maybe something system specific. Please try this:
|
Posted by: atomant Apr 16 2004, 07:05 PM |
For DEFAULT_DOMAIN to work you need to put it in /usr/sbin/sendmail.sh script line: export DEFAULT_DOMAIN=mydomain This way it works 100 % (tested). |
Posted by: vegetto34 Apr 17 2004, 05:18 AM |
OK I put it in sendmail.sh, but it was a new file... was it supposed to already be there? I see a sendmail.xmail.sh file... should I edit that one? Do I need to do anything special? Reboot? Restart xmail? Or will it work next time Cron runs in 4 hours? |
Posted by: atomant Apr 17 2004, 07:26 AM |
Yes, you edit sendmail.xmail.sh. It contains only a few lines. You don't need to restart xmail. Just wait for the next cron to run or run it manually. |
Posted by: vegetto34 Apr 17 2004, 12:09 PM | ||
Success! That finally did it. Man what a piece of work. Was this RH9 exclusive? I noticed in the crontab file there is a MAILTO line... would it not be possible to allievate all of this mess and say just change it from "root" to "root@domain.com" ? Or if you don't want e-mails just take out "root" and leave it "". |
Posted by: atomant Apr 17 2004, 12:17 PM |
No, this was not RH9 exclusive, I have RH8 and this is for all *nix. Yes, you could change MAILTO in crontab or just remove BUT where is the beauty of fixing it to quckly. Well, default domain has it's advantages: if you want to send a mail with the /usr/bin/mail than it will add a domain to a username which is very nice because some mailservers rejects sender without a domain. |
Posted by: vegetto34 Jun 7 2004, 06:47 AM |
I had to edit the sendmail.xmail.sh again after upgrading to 1.20 as it appears that file got wiped and I was getting sending errors on my Cron runs. |