Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
Is there any way to send a simple email as such at linux terminal?
to: somebody#gmail.com
sub: Sending email from linux terminal
body: This is a short email sent from linux terminal
What kind of stack or smtp do i need to setup? How do I set them up?
Version for terminal:
mail somebody#gmail.com
Version for shell scripts:
echo "This is a short email" | mail -n -s "Sending email" somebody#gmail.com
AFAIK typical Linux distribution install MTA (sendmail/postfix/exim/...) by default. If you have static public IP address then its quite possible you have a working self-configuration.
Configuration of MTA without static public IP is more tricky.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 1 year ago.
Improve this question
I'm looking for a way to have a Raspberry Pi receive an mail and run a script after receiving.
I don't find anything related to this online. Any advice? Thanks :)
I'd set up procmail on that raspi, and add a user account that will receive the coffee status emails and which holds the procmail recipes and your script. See How to Run a script when a mail arrives in mail server? (Debian) for example.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Attempting something devious on my machine leads to
ryan#debian:~$ sudo EAT_ALL_THE_COOKIES_BEFORE_DINNER
[sudo] password for ryan:
ryan is not in the sudoers file. This incident will be reported.
Where is this incident reported, and how do I get the log of all the nasty attempted commands?
Nevermind, I just found the answer in the alt-text at xkcd:
Replace root with your username, in my case ryan, so the log is found with:
cat /var/spool/mail/ryan
The report is sent as an email to the root user. Many Linux distributions will automatically setup an alias for that user directing the mail to the first account created during the install process.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I have setup postfix locally on my Linux box, it relays to my gmail account. This works nicely thanks to http://www.howtoforge.com/postfix_relaying_through_another_mailserver
However I would like to be able to specify the sender address (From:), I could not figure out what I needed to do. Does anyone knows how I can specify any of my (pre)configured valid gmail address ? All I could find is this:
http://support.google.com/mail/bin/answer.py?hl=en&answer=22370
Thanks
I did post this question to the debian-users group and got the following answer:
You can specify any headers with -a, e.g.
$ mail -a 'From: "My Name" ' da
http://lists.debian.org/debian-user/2012/04/msg00993.html
Which works beautifully
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I want grant user rights to copy a specific file from a remote server via SSH. And I do not want to give him any opportunity to execute something else on a remote server.
I have an access to a remote machine but I'm not an adimistrator, and I want to give another user possibility to copy specific file but nothing else.
Is there any way to sign a script in linux to avoid modification of this script or something similar that could help?
There is a solution to restrict SSH run only specific command:
http://chihungchan.blogspot.com/2008/08/restrict-ssh-to-run-specific-command.html
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I receive forwarded emails from an email like info#companyname.com to my Gmail account; when I respond to these emails, I want they look as if they came from info#companyname.com instead of my Gmail account.
Is this possible?
Yes, this is entirely possible.
Here's a link to google's knowledgebase describing exactly what to do: http://mail.google.com/support/bin/answer.py?answer=22370
Not really a question for Stack Overflow, but have a look here:
http://gmailblog.blogspot.com/2009/07/send-mail-from-another-address-without.html
It's a post on the official GMAIL blog outlining how to send via an external SMTP host.