Debian Configuration :: Can't Send Email From Command Line Using Mail
Mar 17, 2010
I'm running a desktop-less version of Debian via Sun VirtualBox. The reason I'm doing this is because I don't have enough graphics or RAM power to have a desktop environment running on top of my current desktop; also, I want to learn Linux through the command prompt. I'm running the AMD64 version of Debian; I'm not sure if that's relevant.
My main goal is to be able to email useful files from the virtual Debian to my main computer, so that I can save them for later if I ever decide to do a "real" installation of Debian on this computer. I realize now that there's probably some "easy" way to do this by reading the virtual machine's hard drive, but at this point, my curiosity wants to see this issue resolved. I started off wanting to find a command-line program to send my email with, and one was built-in. The syntax ~$ sudo mail -s "Subject" email@example.com "This is a test email."
is what I found. I tried it, and (unsurprisingly), it failed. I then learned that the mail command calls exim4, or something along those lines, so I needed to configure exim4. Soon thereafter, I learned that Yahoo's SMTP wasn't public, but Google's was. So, I found this web page which described how to configure exim4 to allow for email to be sent to a Gmail account. I made one, and followed the page word-for-word.
I sudo-mailled a test email to my Gmail account, and nothing happened. I waited a bit longer, and still, nothing happened. Finally, I started looking around, and found out about the exim4 logs in /var/log/exim4. In my mainlog, I think that it's telling me that Google denied my connection: <date><time><random numbers and letters> == **********.gmail.com R=send_via_gmail t=gmail_smtp defer (111): Connection refused
So, now, I'm just stuck. I don't know what I did wrong, I checked my exim4.conf.template twice for spelling errors, but I don't think I made any. At this point, I can only hope that someone else has had a similar problem, or knows what I'm doing wrong (or haven't done yet).
Can anyone tell me what the pros and cons are between heirloom-mailx vs mailutils? This is for ubuntu 10.04 LTS. AT this point my only purpose is to use the mail command line program to occasionally send log output to email aliases.
Is there an easy to use program that I can use to send mail from the command line? I want to be able to create a batch script to send mail from different text files. What I'm looking for is something like: mailapp mailserveraddress destinationmailaddress mymailaddress filetosend
I'm running SUSE linux Server version 11. I want to configure mail server with postfix & cyrus-imap. For that, i have read many documents in Internet by i met issues. I'm running DNS in this server & it's ok Now I cannont send mail through command line.
Send an E-mail to your local account. Try two different ways to send and read it. How can you check that it really arrived? I decided to try using the 'mail' and 'pine' commands. So:
1) Using the root account, intending to send an e-mail to myself (root):
# mail -s "Hello root!" root Simple form of sending e-mails internally. ^D (this keystroke is to finish the e-mail) EOT
2) Using 'pine', another e-mail client: The mail is composed correctly, with 'To:' field set to:
which is my hostname, as my box runs in a VMWare Slack 12.2 image. In both cases, nothing was received in my mailbox (by typing #mail)... Additionally I don't see any new e-mails when I look at the file '/var/spool/mail/root'. Do I need extra information configuring my mail client/server/service?
I'm looking for an easy way to send basic emails for the command line. I have tried configuring sendmail and mailx, but I have yet been able to receive a test email at my remote address. I have read through a fair amount of "how to" on this but I am a little confused and obviously not doing something right. My sendmail.mc file is as follows
i am working on a neat little bash script, and i want the output to be mailed to my email account. So far i have tried installing sendmail then running: mail -s Test firstname.lastname@example.org But that hasn't worked; and i did check my spam folder. Am i missing something or is there a better technique all together?
I am trying to send e-mail from command line by using "mail" in fedora. It goes to e-mail server in the same network but it is refused by other outside this network with message: "..... Connection refused by email@example.com ......
Could anyone point me to some simple articles that explain what email encryption is and how to set up a mail server (e.g. Exim) that can send secure emails? I know nothing about networks, mail servers, encryption, etc., but I have to be an expert on it before I walk into work tomorrow morning.
In my Windows environment, I use email client such as Microsoft Outlook to connect to our email server to send email with the following configuration:
Incoming server (POP3): 995 - (requires with SSL) Outgoing server (SMTP): 465 - (use encrypted connection SSL)
And the mail server requires user ID login and password.how do I setup a text command based email client in my Linux (Centos 5.1) to send out email through the existing email server above, which is in another machine? The email client has to be text command based because I need to use command line to send notification email from anothar application installed in my Linux (Centos 5.1) Since the email client will only be used to send email notification, I don't require setting up of an email server in my linux.
I use gmail for all of my emailing needs but stumbled upon linux counter at counter.li.org. Now I registered on the site and downloaded the machine-update script from the site. So I ran it and it collected the required data. But when I run ./machine-update -m as they have told, I guess no mail gets sent as I have to configure the mail program. How do I configure it so that it sends mail from my gmail address using stmp?
I'm trying to setup notification function for the Nagios Core which use Mail to send notification.I got an account from Rogers. I have SMTP server, email account with authentication information.My Nagios server is in a workgroup, there is now domain assigned to it, I just use nagiosserver.localdomain in /etc/hosts.I added Rogers SMTP server in /etc/mail/sendmail.mc and Future (AuthInfo) I created an /etc/mail/AuthInfo and add AuthoInfo:smtpserver "U:user" " P: pwd" "M:Plain"I added smtp server in /etc/mail/access for RelayI added firstname.lastname@example.org on /etc/mail/virtusertableI regenerated sendmail.cf by user m4 commandrestart sendmail service.When I ran: Mial -s test email@example.comIt did not prompt any error message , in the maillog it says the message is queued but It can not be sent out
I have a server ubuntu 9.10.I have 2 adsl lines, one with a static ip for incoming mail and a dynamicI have to do this to have backup.Is it possible to set the server so it will only use the line with the static ip to send email?At the moment the server uses both. It authenticates with the one supplier when it uses the other line.The problem is that when a mall comes in and has a forwarder on my server the supplier blocks it as it thinks it is spam, because it is send from another email. My IT guy is really battling to sort this out.
what do I need to change in postfix/ dns to send email to one one of the email server hosted by 1and1.
I'm using zenoss to monitor system/ network and devices. I wanted to setup email notification , so I installed postfix. All works fine when I use my private account on yahoo or hotmail. but when I specify email account that is hosted by 1and1 I receive error 421. "
xxxxmyserver postfix/smtp: B0A5B22A06: to=<1and1emailaddress>, relay=mx00.1and1.co.uk[220.127.116.11]:25, delay=0.8, delays=0.04/0.02/0.62/0.12, dsn=4.0.0, status=deferred (host mx00.1and1.co.uk[18.104.22.168] said: 421 invalid sender domain 'xxxxmyserver' (misconfigured dns?) (in reply to RCPT TO command))
I've been trying to send mail to email account even after installing postfix but am not able to do so.My distro is Centos 5.4. I followed the Centos user guide to install and configure postfix into the server,
Code: http://wiki.centos.org/HowTos/postfix but still didn't receive any email.
I'm trying to configure postfix so smart daemon can send out notifications emails. My system will need to send emails to a mail server that is on the same local network. I have not had much luck in getting this to work, and am confused on what I need to setup to do this and how to set it up. Does my system need to be apart of the same domain as the mail server? If so, how do I do this? Is there any restrictions sending emails from the command line as the root user? Do I need to configure a relayhost?
Basically all I need to do is send emails to a local mail server, i.e. a mail server on the same local network. I do not need to receive emails. I am rather clueless as to how to set this all up, and what I need for this basic email functionality. I have read and tried many postfix configuration tutorials, but when I try to send out a test email to a email address on the local network mail server I always get "Connection refused" to the server and deferred or bounced status on my test email.
I have a server with a static IP that I use as a sendmail server. The problem is that port 25 is exposed. As a result, anybody can login to the SMTP server and send mail from my domain as a user that does not exist as well as email from other non-existant domains. I'm sure there are sendmail options that I can enable to do some checks, like if the user exists on that server or if the domain is the same on the server, etc. I was wondering if you guys can mention a few that I can add to my sendmail.mc file?
I have thought about auth login, the problem is if auth login is on my public port then I won't be able to receive email from gmail because it would be unauthenticated. Also, I only have 1 mail server. I know the ideal solution is to have 2 mail servers. One for outgoing mail/internal mail server where you can enable auth login and the other for incoming mail which just acts as the relay to the internal mail server. That way spammers can't login to send mail out. That's another question I had, how do I configure sendmail to only send email out/in?
Anyhow, so I have to make do with 1 mail server for now. So I decided to add a few rules on iptables. I grabbed the IP range that gmail uses when I receive mail from then and added it to my iptables with the following command.