Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Sending cronjobs to gmail
View unanswered posts
View posts from last 24 hours

Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message

Joined: 16 Aug 2002
Posts: 1615
Location: U.S.A.

PostPosted: Tue Jan 07, 2014 2:33 am    Post subject: Sending cronjobs to gmail Reply with quote

Just got a webcam and was setting up Motion to monitor motion via the webcam. Got that working, but then wanted it to send the videos to my gmail account. But before could get that going got an fcron email and the To: was wrong. So got error from gmail, but it did get to me cause the From: was setup correctly. I successfully installed ssmtp with mailx. But mailx doesn't like sending mime very well, so unmerged it. Installed Mutt and that worked. But didn't want to keep getting fcron job errors.

What it was doing was adding my username to the email address like:

Searched the net and didn't come up with a positive fix, but stumbled upon it. So will post here that might help others.


# /etc/ssmtp.conf -- a config file for sSMTP sendmail.

# The person who gets all mail for userids < MinUserId
# Make this empty to disable rewriting.
#changed from postmaster

# All mail delivered to userid >= MinUserId goes to user, not root.

# The place where the mail goes. The actual machine name is required
# no MX records are consulted. Commonly mailhosts are named
# The example will fit if you are in and your mailhub is so named.
#changed from mail

# Example for SMTP port number 2525
# mailhub=mail.your.domain:2525
# Example for SMTP port number 25 (Standard/RFC)
# mailhub=mail.your.domain       
# Example for SSL encrypted connection
# mailhub=mail.your.domain:465

# Where will the mail seem to come from?

# The full hostname

# Gentoo bug #47562
# Commenting the following line will force ssmtp to figure
# out the hostname itself.
#uncommented and changed from _HOSTNAME_
## had this and worked, but try below cause getting from cronjobs wrong:
## might have to be:

# Set this to never rewrite the "From:" line (unless not given) and to
# use that address in the "from line" of the envelope.

# Use SSL/TLS to send secure messages to server.

# Use SSL/TLS certificate to authenticate against smtp host.

# Use this RSA certificate.

# Get enhanced (*really* enhanced) debugging information in the logs
# If you want to have debugging of the config file parsing, move this option
# to the top of the config file and uncomment

#Added these lines from here:
#commented out ones done above. The uncommented weren't above
#added below, but might not need, may just need username
AuthPass=xxxxxxxx <add your password>
# Are users allowed to set their own From: address?
# YES - Allow the user to specify their own From: address
# NO - Use the system generated From: address

From this it worked sending an email to gmail. But mailx didn't do what wanted so unmerged and installed Mutt. Mutt worked, but isn't necessary to discuss any further here cause didn't contribute or fix the frcon mail problem.

Fixing the username being added to the gmail account was pretty simple once setup above worked.
Just change

# fcron || dcron:
# This is NOT the system crontab! fcron and dcron do not support a system
# to get /etc/cron.{hourly|daily|weekly|montly} working with fcron or dcron do
# crontab /etc/crontab
# as root.
# NOTE: This will REPLACE root's current crontab!!
# 20 Apr 2002; Thilo Bangert <>

# check scripts in cron.hourly, cron.daily, cron.weekly and cron.monthly
55 19 1-31 1-12 0-7 /home/decibels/cron.weekly/gnucashbackup.cron
.... rest of frcontab

Now I get this:
from: fcron <>

And can move on to writing a script to email the videos from Motion.
Hope this helps anyone with this problem or if you just want to send cronjobs to your gmail account.
Support bacteria – they’re the only culture some people have.”

– Steven Wright
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

Jump to:  
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