I installed exim4 on my debian machine. And I've successfully send an email to my Gmail address. But when I send an email from my Gmail to my linux machine. I dont know how can I read it and where is the location of this email.
By default all e-mail goes to /var/spool/mail/$USERNAME
where $USERNAME is the username you're using.
If you don't have a mail reader installed, you can try to use
mailx
at a terminal but it's interface is hard to use (basically p, n, and other keystrokes) for begginers. Another, better option to be used at a terminal is
mutt
Cheers
Related
I have a Ubuntu 14 server, I have to assign a email account to this server, when some person write a email to this account, the server have to open this mail automatically, and check if there are a specific information, if yes some thing happen.
I suppose that the email are stored in a data base o something like that, but I not have any idea how to start.
Any Idea
First you should get confident how mail systems work in general on linux machines. A good start would be to dig into the linux documentation project, particularly the linux electronic mail administrator HOWTO, chapter 3 (how electronic mail works): http://www.tldp.org/HOWTO/Mail-Administrator-HOWTO.html#toc3
Then, you can decide to which extent you want to set up your email account on the ubuntu server (full smtp server, only mail client etc).
As #arkascha mentions in his comment, the least painful way would be to use an existing mail server and fetch mail from there. With scripts, appropriate actions can be taken once a mail has been received.
If I have correctly understood your question, what you need is a mail alias to a command.
The following may depend on the actual mail server that you use, at least it is relevant for good old sendmail, and postfix. The mail system can use an alias database (normally the file /etc/aliases) but can be hashed into a binary version. This files can contains plain aliase that simply redirect a mail address to other mail addresses, and can also contain file aliases (the mail is appended to a local file) and program aliases.
In this last case (lines are like local_address: | /path/to/program), the program is started for each mail, and it receives the message through its standard input. Read the manual for your mail server for more detailed instructions.
I am using CentOS 6, and postfix mail server, from postfix mail log, I want to see which Linux user has sent specific email, is it possible? How can this be done?
I need this to prevent spam from our mailservers, by one of our users. I need to figure out which user, and what script.
Since you know which email you are looking for (you should know its ID from the message header), you can simply find it in postfix mail log located in /var/log/mail.log - just look for the message ID in the log.
i'm using fedora and i'm wanting to send a file using mailx to another user on the host PC, how would i go about doing this? i only know how to send to a email address
i'm new to this, thanks
i only know how to send to a email address
Then you are nearly there. Send it to username#localhost where username is his login name.
I have a server with roundcube installed in it. I tried sending email into it from external email with my username#servername. It turns out that I was not able to read emails (no email pops up in inbox) but when I send email to some external email address from roundcube then it works fine. I was wondering if there is any command-line code to read any emails that any user #server receives.
Yes. There is a nearly 30 yrs old 'mail' command. But an
apt-get install alpine
helped a lot as well.
I am using sendmail with Amazon SES. It works fine with email address which are verified only.
So first of all i want to know when root runs cron job then which email address it uses as from
How to change that email address
You should be able to use the -f flag of the sendmail command to specify the envelope from address, and you should me able to specify the meesage from address in headers of the message itself. For example:
/usr/sbin/sendmail -f from#from.com to#to.com < message.txt