View previous topic :: View next topic |
Author |
Message |
glober Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 20 Oct 2002 Posts: 77 Location: Vancouver, Canada
|
Posted: Sat Nov 09, 2002 5:40 am Post subject: sendmail can't open the SMPT port |
|
|
I just got my gentoo running and after a few stumbles I have most things running OK. One nagging thing I haven't been able to figure out is why I keep getting the following message:
/usr/sbin/sendmail: can't open the SMPT port (25) on mail.
My installation was from a K6-2 stage 3 tarball, and I chose to install metalog and vcron. After that I emerged X and KDE. The thing is I never installed sendmail nor do I want to. I looked at the various scripts in the /etc directory but I just can't figure out what is causing this message. Not that it's
causing any harm, it is kinda annoying. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
prberens n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/gallery/Funny_Figure/startrek.gif)
Joined: 22 Aug 2002 Posts: 27 Location: 34° N 118° W
|
Posted: Sat Nov 09, 2002 5:51 am Post subject: |
|
|
It is cron. To disable cron trying to send an email after each run (hourly), put MAILTO="" at the top of your crontab. _________________ - P -
Make it right before you make it faster. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
lx Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/3e83a3b53cf36f6da849c.jpg)
Joined: 28 May 2002 Posts: 1012 Location: Netherlands
|
Posted: Sat Nov 09, 2002 12:24 pm Post subject: |
|
|
With fcron I use !mail(false) at the top of my crontab file, but I don't know the option for vcron.
Cya lX. _________________ "Remember there's a big difference between kneeling down and bending over.", Frank Zappa |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
rac Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/42db5dbb3e1c92424d747.jpg)
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Sat Nov 09, 2002 8:24 pm Post subject: |
|
|
Moving from Installing to Networking. _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
glober Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 20 Oct 2002 Posts: 77 Location: Vancouver, Canada
|
Posted: Mon Nov 11, 2002 10:22 pm Post subject: |
|
|
prberens wrote: | It is cron. To disable cron trying to send an email after each run (hourly), put MAILTO="" at the top of your crontab. |
Tried what you suggested but I still keep getting the message |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
glober Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 20 Oct 2002 Posts: 77 Location: Vancouver, Canada
|
Posted: Mon Nov 11, 2002 10:24 pm Post subject: |
|
|
lx wrote: | With fcron I use !mail(false) at the top of my crontab file, but I don't know the option for vcron.
Cya lX. |
Tried your suggestion as well and I still get the message |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
col l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/151396989846b908e08692e.jpg)
Joined: 08 May 2002 Posts: 820 Location: Melbourne - Australia
|
Posted: Mon Nov 11, 2002 10:32 pm Post subject: |
|
|
find the command in cron.hourly or wherever it is and pipe it to /dev/null like:
/usr/bin/webalizer 1> /dev/null 2> /dev/null |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
fyerk Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 17 Sep 2002 Posts: 212 Location: Atlanta, GA
|
Posted: Tue Nov 12, 2002 3:04 am Post subject: |
|
|
col wrote: | find the command in cron.hourly or wherever it is and pipe it to /dev/null like:
/usr/bin/webalizer 1> /dev/null 2> /dev/null |
The easier way to do this is to just send stdout to /dev/null and redirect stderr to stdout
Code: |
/usr/bin/webalizer > /dev/null 2>&1
|
_________________ -David |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
lx Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/3e83a3b53cf36f6da849c.jpg)
Joined: 28 May 2002 Posts: 1012 Location: Netherlands
|
Posted: Tue Nov 12, 2002 12:35 pm Post subject: |
|
|
Well maybe the first question should be, is this problem related to the cron service. Have you determined already what proces is causing the message? (recurring event, when / starting stoping services, etc).
Maybe we're blaiming cron (although it's a good candidate), but it might be something else,
Cya lX. _________________ "Remember there's a big difference between kneeling down and bending over.", Frank Zappa |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
glober Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 20 Oct 2002 Posts: 77 Location: Vancouver, Canada
|
Posted: Thu Nov 14, 2002 7:23 am Post subject: |
|
|
lx wrote: | Well maybe the first question should be, is this problem related to the cron service. Have you determined already what proces is causing the message? (recurring event, when / starting stoping services, etc).
Maybe we're blaiming cron (although it's a good candidate), but it might be something else,
Cya lX. |
Looking at the various crons (hourly,daily,weekly,monthly) they are all empty, as I haven't put anything in there, nor am I too fluent on the needs of what one should have in there.
I do not see the command " /usr/bin/webalizer " in any of the crons.
The message recurrs about every 15 to 20 minutes, so it doesn't look like it would be caused by the hourly cron. As far as seeing whether it coincides with any action or event, it doesn't seem to, it seems to happen all by itself. One thing I should add, is that it only happens in the initial command line terminal window, so I notice it only if I don't start X or after I do a shutdown, which is when I see how many times the message occured.
Over all, my system is a fairly basic setup like I described in my original message, I do not have sendmail installed, and I didn't do any weird tweeking.
I am suprised that I didn't find any reference to this quirk in any of the forums. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Jeff In Motion n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/gallery/Simpsons/simpsons_smithers.gif)
Joined: 06 Jun 2002 Posts: 8
|
Posted: Thu Nov 14, 2002 1:31 pm Post subject: |
|
|
I'm having the same exact problem. I just did a fresh 1.4_rc1 install, and about every 20 minutes or so I get this message.
Code: | /usr/sbin/sendmail: can't open the smtp port (25) on mail. |
I too am using vcron.
I've done some searches around the board on this issue, and it remains ultimately unsolved (for me at least). The two possible solutions seem to be either a) correctly configure /etc/ssmtp/ssmtp.conf -- or b) install postfix
Well unfortunately, I never use sendmail, and the only thing I could ever see myself using sendmail for, on this machine, is to send local mail only -- thus, I have no clue at all how to correctly configure ssmtp to not get this ridiculous error message. Could someone possibly post a sample configuration to fix/disable the issue?
I also thought about installing postfix, but smtp seems to be in conflict with it, and I'm worried about breaking something (I'm pretty new to Gentoo). So if someone couldn't help me with solution a, what steps would I have to take to install postfix without breaking other things? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
lx Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/3e83a3b53cf36f6da849c.jpg)
Joined: 28 May 2002 Posts: 1012 Location: Netherlands
|
Posted: Thu Nov 14, 2002 9:32 pm Post subject: |
|
|
Jeff In Motion wrote: | I also thought about installing postfix, but smtp seems to be in conflict with it, and I'm worried about breaking something (I'm pretty new to Gentoo). So if someone couldn't help me with solution a, what steps would I have to take to install postfix without breaking other things? |
Just unmerge ssmtp and install postfix, well that's what I've done, but if you don't have a need for postfix it seems like a very very very crude work around.
Maybe you can find out something using a dummy file /usr/sbin/sendmail containing something like
Code: | #!/bin/bash
echo ${*} > /tmp/sendmail.log
exit 0 |
ps. don't forget chmod +x /usr/bin/sendmail
Have you checked the var/log/everything or similar, normally errors are reported with the process causing them, well if you're lucky anyway.
Hope you'll fix it, seeing 2 people already have the same problem, so more to come,...
Cya lX. _________________ "Remember there's a big difference between kneeling down and bending over.", Frank Zappa |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
really Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/1526496202408e0bc5f0e94.jpg)
Joined: 27 Aug 2002 Posts: 430 Location: nowhere
|
Posted: Fri Nov 15, 2002 5:42 pm Post subject: |
|
|
i too have started to get the same error.
just after Telia (my isp) turned there port 25 off.
i dont actually care about the error message, all works fine
but i do get this when iploging all traffic.
UDP: dgram to port 1035 from mail1.telia.com:53 (116 bytees) sometimes 113 and varies.
which is said to be the outgoing POP3 server.
i dont think thats a install problem sence i never saw that error for 4 mothns, but after they closed port 25 to stop the spammers or something it started coming up. _________________ NoManNoProblem
Get lost before you get shot. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
glober Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 20 Oct 2002 Posts: 77 Location: Vancouver, Canada
|
Posted: Sat Nov 16, 2002 3:47 am Post subject: |
|
|
lx wrote: |
Maybe you can find out something using a dummy file /usr/sbin/sendmail containing something like
Code: | #!/bin/bash
echo ${*} > /tmp/sendmail.log
exit 0 |
ps. don't forget chmod +x /usr/bin/sendmail
Have you checked the var/log/everything or similar, normally errors are reported with the process causing them, well if you're lucky anyway.
|
I should have checked before, but it in fact I do have /usr/sbin/sendmail executable on my system, and it is actually a link to /usr/sbin/ssmtp , which when I check, is in fact installed on my system.
My question now is, if I didn't emerge the "ssmtp" individually, will I break some dependancy if I do an unmerge of it, and will unmerging get rid of the problem.
Another observation I have, that after checking /var/log/everything , I do see that cron is causing this activity, and at an exact 15 min interval. I didn't know there was a 15 minute cron. Does anybody have an explanation?
here are the log entries that get repeated every 15 minutes:
Nov 13 22:45:00 [CRON] (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )
Nov 13 22:45:00 [CRON] (root) CMD (root^Itest -x /usr/sbin/run-crons && /usr/sbin/run-crons )
Nov 13 22:45:00 [sSMTP mail] unable to connect to "mail" port 25.
Nov 13 22:45:00 [sSMTP mail] can't open the smtp port (25) on mail.
Nov 13 22:45:00 [CRON] (root) MAIL (mailed 33 bytes of output but got status 0x0001 ) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ronmon Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/13591982763f6f0b3bbbe64.png)
Joined: 15 Apr 2002 Posts: 1043 Location: Key West, FL
|
Posted: Sat Nov 16, 2002 1:37 pm Post subject: |
|
|
So far so good, though I will give it a while before claiming success. Doing an 'emerge -C ssmtp' and 'emerge postfix' seems to have fixed it. /usr/sbin/sendmail is now a real executable instead of a link and no more nags in the log.
Nothing seems to have broken so it might be worth a shot. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
darktux Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/d5e4bdd03dfd1b80db613.jpg)
Joined: 16 Nov 2002 Posts: 1086 Location: Coimbra, Portugal
|
Posted: Sat Nov 16, 2002 5:07 pm Post subject: |
|
|
Doing a
wouldn't have been a bad idea.. I just read the first post, sorry if I'm off topic right now ![Smile :-)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
lx Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/3e83a3b53cf36f6da849c.jpg)
Joined: 28 May 2002 Posts: 1012 Location: Netherlands
|
Posted: Mon Nov 18, 2002 1:26 pm Post subject: |
|
|
glober wrote: | Another observation I have, that after checking /var/log/everything , I do see that cron is causing this activity, and at an exact 15 min interval. I didn't know there was a 15 minute cron. Does anybody have an explanation?
here are the log entries that get repeated every 15 minutes:
Nov 13 22:45:00 [CRON] (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )
Nov 13 22:45:00 [CRON] (root) CMD (root^Itest -x /usr/sbin/run-crons && /usr/sbin/run-crons )
Nov 13 22:45:00 [sSMTP mail] unable to connect to "mail" port 25.
Nov 13 22:45:00 [sSMTP mail] can't open the smtp port (25) on mail.
Nov 13 22:45:00 [CRON] (root) MAIL (mailed 33 bytes of output but got status 0x0001 ) |
the exact line is in /etc/crontab, and it's executed at an 15 min. interval. It's the hart of the cron.hourly etc, the hourly, daily etc are workarounds to simplify cron jobs. question is why it wants to mail, have you deleted /usr/sbin/run-crons or something, well I haven't added the file /etc/crontab cause I don't need it, it I want to do something hourly c.q. daily I can easily implement it using fcron, without the need of a script. I think you can run "crontab -e" (well at least with fcron) to see the users crontab,
Cya lX. _________________ "Remember there's a big difference between kneeling down and bending over.", Frank Zappa |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
glober Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 20 Oct 2002 Posts: 77 Location: Vancouver, Canada
|
Posted: Tue Nov 19, 2002 3:31 am Post subject: |
|
|
lx wrote: |
the exact line is in /etc/crontab, and it's executed at an 15 min. interval. It's the hart of the cron.hourly etc, the hourly, daily etc are workarounds to simplify cron jobs. question is why it wants to mail, have you deleted /usr/sbin/run-crons or something, well I haven't added the file /etc/crontab cause I don't need it, it I want to do something hourly c.q. daily I can easily implement it using fcron, without the need of a script. I think you can run "crontab -e" (well at least with fcron) to see the users crontab,
Cya lX. |
You are right, /etc/crontab does have what looks like what is being executed every 15 minutes. Here is my crontab in full:
# check scripts in cron.hourly, cron.daily, cron.weekly and cron.monthly
# for vixie cron
# remember to give cron a sighup when updating this file
#
# $Header: /home/cvsroot/gentoo-x86/sys-apps/vcron/files/crontab,v 1.2 2002/04/27 21:46:45 bangert Exp $
#
#
*/15 * * * * root test -x /usr/sbin/run-crons && /usr/sbin/run-crons
0 * * * * root rm -f /var/spool/cron/lastrun/cron.hourly
0 0 * * * root rm -f /var/spool/cron/lastrun/cron.daily
0 0 * * 6 root rm -f /var/spool/cron/lastrun/cron.weekly
0 0 1 * * root rm -f /var/spool/cron/lastrun/cron.monthly
Why its running SSMTP, Idon't know. I do have the /usr/sbin/run-crons script on my system, and it also doesn't have any reference to SSMTP. As far as crontab itself, no I didn't add it myself, and I am not really sure what the syntax means, how I should edit, delete, or whatever. Obviously " */15 " means it executes every 15 minutes. BTW running "crontab -e" just shows me the contents of crontab. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
lx Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/3e83a3b53cf36f6da849c.jpg)
Joined: 28 May 2002 Posts: 1012 Location: Netherlands
|
Posted: Tue Nov 19, 2002 10:14 am Post subject: |
|
|
glober wrote: | Why its running SSMTP, Idon't know. I do have the /usr/sbin/run-crons script on my system, and it also doesn't have any reference to SSMTP. As far as crontab itself, no I didn't add it myself, and I am not really sure what the syntax means, how I should edit, delete, or whatever. Obviously " */15 " means it executes every 15 minutes. BTW running "crontab -e" just shows me the contents of crontab. |
it default behaviour is to run /usr/bin/sendmail and send the output of the executed task or just a notificating that the task is executed.
Well except for vcron you have to manually install crontab using crontab /etc/crontab (it's in the install instruction of gentoo). This overrides the current crontab with the one in the file /etc/crontab. Running crontab -e, you can change the current crontab, so the one cron is actually using (well for dcron and fcron).
Have you tried adding MAILTO="" (dcron, i think) ((or !MAIL=false (fcron))) as suggested earlier to the top of the crontab using crontab -e; maybe this needs a restart of cron, but I don't think so.
If this doesn't work you could make an empty script instead of the /usr/bin/sendmail link, but I don't know if this has consequences for other packages,
Quote: | ssmtp: A minimal mail-transfer agent which forwards mail to an SMTP server | , I don't think you have it configured and therefor it gives an error.
Do you have crontabs in cron.h.... etc, (/etc/cron.daily/whatis.... needs to be edited for it to work), else just remove the startup script from the boot level rc-update del dcron boot.
Hope you'll fix it,
Cya lX. _________________ "Remember there's a big difference between kneeling down and bending over.", Frank Zappa |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
glober Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 20 Oct 2002 Posts: 77 Location: Vancouver, Canada
|
Posted: Fri Nov 22, 2002 10:17 pm Post subject: |
|
|
lx wrote: |
Have you tried adding MAILTO="" (dcron, i think) ((or !MAIL=false (fcron))) as suggested earlier to the top of the crontab using crontab -e; maybe this needs a restart of cron, but I don't think so.
If this doesn't work you could make an empty script instead of the /usr/bin/sendmail link, but I don't know if this has consequences for other packages |
I tried putting MAILTO="" and !MAIL=false into crontab with no results, but I did decide to try and disable the /usr/sbin/sendmail link, which I did by renaming it to something else, and presto, the nagging message is gone. Not that this gives me an automated mail system, but then on a home system I don't think I need one. So far I haven't seen any bad after effects.
Thanks for your assistance, glober. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mag n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/44919f733de3d0d675dc5.jpg)
Joined: 27 Aug 2002 Posts: 41
|
Posted: Thu Nov 28, 2002 9:30 pm Post subject: |
|
|
There are a few ways to fix the mail problem - either install a proper MTA or correct the configuration for SSMTP.
Edit /etc/ssmtp/sstmp.conf and put in a valid address for the mailhub variable.
You could also always disable cron, but that's generally not recommended. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
keratos68 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/16395973883eed7d68216e5.gif)
Joined: 27 Dec 2002 Posts: 561 Location: Blackpool, Lancashire, UK.
|
Posted: Sun Dec 29, 2002 9:36 pm Post subject: |
|
|
MAILTO needs to be set to null string (i.e. export MAILTO="") in your global profile (i.e. /etc/profile.env)
The vixie-cron (VCRON) binaries are set to mail the person identified in the shell variable LOGNAME if MAILTO is not defined at all, wierd - but just set MAILTO to "" |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Reformist Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/4432e87e3dec2c57b6b0c.gif)
Joined: 06 Oct 2002 Posts: 323
|
Posted: Wed Apr 09, 2003 8:21 pm Post subject: |
|
|
Running stderr to /dev/null in the /etc/crontab did the trick, because I had a job that was executing every minute (I meant it to be every hour, so I fixed that), and it was printing an error message because I wasn't online.
BTW, suggesting to fix /etc/ssmtp/sstmp.conf is not a good idea some of the time, because I had this message appearing every minute, which means if the mail forwarding option is actually set up correct, I'd be getting 60 emails an hour from cron =) _________________ -Phil Crosby |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
carrett Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/gallery/Southpark/avatar30.gif)
Joined: 22 Mar 2003 Posts: 273
|
Posted: Fri Apr 18, 2003 8:27 am Post subject: |
|
|
lx wrote: | Jeff In Motion wrote: | I also thought about installing postfix, but smtp seems to be in conflict with it, and I'm worried about breaking something (I'm pretty new to Gentoo). So if someone couldn't help me with solution a, what steps would I have to take to install postfix without breaking other things? |
Just unmerge ssmtp and install postfix, well that's what I've done, but if you don't have a need for postfix it seems like a very very very crude work around.
Maybe you can find out something using a dummy file /usr/sbin/sendmail containing something like
Code: | #!/bin/bash
echo ${*} > /tmp/sendmail.log
exit 0 |
ps. don't forget chmod +x /usr/bin/sendmail
Have you checked the var/log/everything or similar, normally errors are reported with the process causing them, well if you're lucky anyway.
Hope you'll fix it, seeing 2 people already have the same problem, so more to come,...
Cya lX. |
the only trouble with the dummy is that if you have a cron job that sends out email every 15 mins. or something, /tmp/sendmail.log will get huge after a couple of weeks. i would do:
Code: | #!/bin/bash
echo ${*} > /dev/null
exit 0 |
unless of course you're using sendmail for anything... _________________ I'm against picketing, but I don't know how to show it. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
BServiss n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 24 Nov 2002 Posts: 62
|
Posted: Tue Feb 17, 2004 2:38 am Post subject: |
|
|
I had a problem with vixie-cron as it seemed to require sSMTP from the emerge --pretend. But after looking at the problems others have had with ssmtp due to improper setup(can't send mail:25), I looked at the ebuild for vixie-cron:
RDEPEND="!virtual/cron
sys-apps/cronbase
virtual/mta
selinux? ( sys-libs/libselinux )"
Instead of a specific program, a generic application class is given and I would guess that ssmtp is first on the list. Also, since ssmtp is also virtual/mta it conflicts postfix.
I think vixie-cron should require postfix for regular handling of local mail. Should this be posted as a bug?
Brian |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|