3

I have added a cron job for my incremental backup, and I configured it like this.But my mail goes to spam folder.so iclick not spam option in mail.it moves to inbox.but again it receives in spam

0 23 * * * /usr/bin/rsync -ravzX /mnt/external/project/ /media/backup/project/ | mail -s "Backup Success" [email protected]

Is there any way to stop mail reciveing to spam folder from cron job ?

3 Answers 3

2

Make sure that the from email Address is the correct one and the MX and Reverse DNS records for the domain and server IP are properly configured.

Once the email server is configured properly, Email services like Gmail, yahoo, etc... will start marking your emails as Valid and will deliver it in your inbox and not in SPAM folder.

Hope this helps.

2
0

First of all, make sure your SPF record is setup to include your server's IP address (easily done by including the +a flag). I won't go into detail on that but even with that setup correctly, it could still be going to spam.

For me I opened the original email message and saw that there was a note for an SPF SOFTFAIL coming from my server's ipv6 address. My domain had DNS A records for the server's ipv4 address but not the ipv6.

Simply adding those AAAA records to my DNS allowed the SPF record to work correctly and identify the server as trustworthy.

-3

In you favourite E-Mail Client, add cron "From:" address to your address book and select in spam settings something like "Never mark messagess from my contact list as spam".

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .