This is my first post and I don't know how to introduce, so I'm just going to jump right in.
So every hour I have cron run a script which outputs a table, and I wanted this delivered as a notification to my smartphone via the Pushover Email Gateway, in which an email sent to a specific @pomail.net email is automatically turned into a notification and shown on my phone.
Ok, so I had already set up the cron script, then I moved to the notification, following the email alerts guide by HowToGeek (Apparently I have too many links)
I found some of the settings confusing, but, after following several error fixes online, such as enabling insecure apps in gmail and adding a line to the end of "/etc/ssmtp/ssmtp.conf", I thought I had it working when "echo "Test message from Linux server using ssmtp" | sudo ssmtp -vvv firstname.lastname@example.org" succeeded in sending an email.
I modified the config file to this (without parentheses): root=(my email id)@pomail.net (the email to send to) mailhub=smtp.gmail.com:587 hostname=localhost AuthUseremail@example.com (my pi email to sent the email from) AuthPass=password FromLineOverride=YES UseSTARTTLS=YES TLS_CA_File=/etc/pki/tls/certs/ca-bundle.crt
And the revaliases file to this: root:firstname.lastname@example.org:smtp.gmail.com:587 (not my actual email)
However, now every hour (the script runs in cron every hour) I receive an email on my email@example.com account from firstname.lastname@example.org inside a conversation in which my email sent a email to "pi" with the bcc of "pi" and a body of the desired message. The email from email@example.com has a body of:
Delivery to the following recipient failed permanently: pi@localhost Technical details of permanent failure: DNS Error: 30638252 DNS type 'mx' lookup of localhost responded with code NXDOMAIN Domain name not found: localhost ----- Original message ----- DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:from:date:to:subject:mime-version :content-transfer-encoding; bh=(random letters that I don't think that I should reveal)=; b=(more secret random letters)== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:from:date:to:subject:mime-version :content-transfer-encoding; bh=(spooky secret letters)=; b=(super secret letters)== X-Received: by (ip address) with SMTP id (I don't think I should reveal this); Wed, 08 Jun 2016 15:00:44 -0700 (PDT) Return-Path: <firstname.lastname@example.org> Received: from localhost ([(my ip)]) by smtp.gmail.com with ESMTPSA id (I don't think I should reveal this) for <pi@localhost> (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 08 Jun 2016 15:00:43 -0700 (PDT) Message-ID: <(another id)@mx.google.com> From: root <email@example.com> X-Google-Original-From: root (Cron Daemon) Received: by localhost (sSMTP sendmail emulation); Wed, 08 Jun 2016 22:00:42 +0000 Date: Wed, 08 Jun 2016 22:00:42 +0000 To: pi Subject: Cron <pi@raspberrypi> /home/pi/speedtest-cron.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Cron-Env: <SHELL=/bin/sh> X-Cron-Env: <HOME=/home/pi> X-Cron-Env: <PATH=/usr/bin:/bin> X-Cron-Env: <LOGNAME=pi>
Then my original message is shown below the error message
Now I have no clue what this email means, and is probably just telling me that I configured something wrong. Anyway, I would love to have an answer to this annoying problem, even if it's just an explanation of how bad I messed up the config files.