LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   mail and mailx unix to google yahoo not working (http://www.linuxquestions.org/questions/linux-general-1/mail-and-mailx-unix-to-google-yahoo-not-working-4175415729/)

forumbaba 07-09-2012 12:19 PM

mail and mailx unix to google yahoo not working
 
Hi All,
I am writing a script to send attachments by email from command line.

I use the following command :

mailx -s "TITLE" user@domain.com < file_to_send

This works when I send an email to my school email address (.edu)

however it does not work when I send an email to a yahoo, google, or outlook email address.

I have tried to search the forum but all posts simply suggest the regular command that I posted up here.

Does anyone have a detailed knowledge of how to fix this problem?

Thanks

TB0ne 07-09-2012 12:25 PM

Quote:

Originally Posted by forumbaba (Post 4723068)
Hi All,
I am writing a script to send attachments by email from command line.

I use the following command :
mailx -s "TITLE" user@domain.com < file_to_send

This works when I send an email to my school email address (.edu) however it does not work when I send an email to a yahoo, google, or outlook email address. I have tried to search the forum but all posts simply suggest the regular command that I posted up here. Does anyone have a detailed knowledge of how to fix this problem?

No...because you've not provided enough details. What version/distro of Linux are you using? What environment (home? business network?)? What version of sendmail/postfix? How are you set up to relay mail out to the rest of the world? Have you looked at your mail log files???

Chances are, you're being blocked from Yahoo/Google by their spam filters, barring any other details.

forumbaba 07-09-2012 12:33 PM

Hi
I am actually using a mac osx snowleopard v10.6

It has mail and mailx that come with the mac

I am mostly on my school network or att when home

Hope this is helpful @TB0ne

TB0ne 07-09-2012 01:07 PM

Quote:

Originally Posted by forumbaba (Post 4723084)
Hi
I am actually using a mac osx snowleopard v10.6

...which isn't Linux, but ok.
Quote:

It has mail and mailx that come with the mac I am mostly on my school network or att when home
No, not really, since we don't know how mailx on Mac relates to Linux and what version of things you're using, or how it's configured. And how are you using mailx, in a bash script or some other program? What are you trying to do, that you can't use your default mail client for? And have you tried to Google for how-to guides/tutorials for Mac OSX and mail???

http://www.unix.com/os-x-apple/16310...l-address.html
https://discussions.apple.com/thread...readID=2641074
https://discussions.apple.com/thread...readID=2647831

forumbaba 07-09-2012 01:32 PM

The question TB0ne is have you personally ever used mail or mailx to send emails to yahoo or google ?
If you have please post how you did it, that would be more helpful than beating around the bush, Thanks

TB0ne 07-09-2012 01:54 PM

Quote:

Originally Posted by forumbaba (Post 4723134)
The question TB0ne is have you personally ever used mail or mailx to send emails to yahoo or google ?
If you have please post how you did it, that would be more helpful than beating around the bush, Thanks

Yes, and I did it (as previously said), by setting up mail to relay, and I asked you that very question in my first reply.
Quote:

Originally Posted by TB0ne
How are you set up to relay mail out to the rest of the world? Have you looked at your mail log files???

You didn't reply, and I've asked other question too, which you've not answered. Again, Mac OSX is NOT LINUX...and I provided you with guides on how to set it up, and asked you for info from the log files.

Unless you provide answers to questions, we can't help you. Again:
  • How are you set up to relay mail out to the rest of the world?
  • Have you looked at your mail log files???
  • What version of sendmail/postfix?
  • How are you using mailx, in a bash script or some other program?
  • What are you trying to do, that you can't use your default mail client for?
  • Have you tried to Google for how-to guides/tutorials for Mac OSX and mail???
Not answering questions, then being nasty about "beating around the bush" isn't a good thing. And again, Mac isn't Linux...we (at least *I*), don't know how to configure mail on OSX, which is why I looked it up for you, and gave you the links. In Linux, you either have postfix or sendmail...and how you set them up is different, depending on what you're using. Just saying "I'm using the mailx that came with OSX" doesn't give Linux users any information to be able to tell you what to edit, where, or how.

forumbaba 07-09-2012 02:58 PM

As I said in my first post, there are many posts about this subject already, posts similar to you replies.
this kind of posts are not in anyway helpful to the problem described here : which is how to send mail from mailx or mail on mac osx, linux or any unix system.

I specifically asked for someone willing to post a DETAILED solution to the probem i.e enumerating what problem they had earlier faced on their system setup and how they solved it step by step.

If indeed you have come across this problem before, please post what changes you made to you system or your email settings that helped solved the problem (in a clear and simple step by step manner).

This is what is required of you and this will be much more helpful.
Thanks

TB0ne 07-09-2012 03:06 PM

Quote:

Originally Posted by forumbaba (Post 4723207)
As I said in my first post, there are many posts about this subject already, posts similar to you replies. this kind of posts are not in anyway helpful to the problem described here : which is how to send mail from mailx or mail on mac osx, linux or any unix system.

I specifically asked for someone willing to post a DETAILED solution to the probem i.e enumerating what problem they had earlier faced on their system setup and how they solved it step by step

If indeed you have come across this problem before, please post what changes you made to you system or your email settings that helped solved the problem (in a clear and simple step by step manner).

This is what is required of you and this will be much more helpful.

Apparently, you're not understanding what you're being told:
  • Mac OSX IS NOT LINUX. I can tell you how to set up both postfix and sendmail ON LINUX to use a smarthost. Those instructions don't apply to Mac OSX, which is why you were given a link that TELLS YOU HOW TO DO IT.. The first link I sent you has complete instructions here: http://yoavgivati.com/2009/10/let-po...-snow-leopard/
  • You were asked several questions, which you don't answer. No answers = no one can help you.
Again, configure your mail relay, however you do that on a Mac. Need step-by-step instructions? Since you're using a Mac, you can call Apple, if the links provided don't walk you through it enough.

forumbaba 07-09-2012 03:39 PM

Obviously, you are not understanding the original question, this is an attempt to use "mail" or "mailx" not "sendmail"

You obviously have not used either otherwise I don't see why you can't post the changes you made on your LINUX system. This is a very very simple requirement: post changes that TB0ne has made on his linux system that got "mail" or "mailx" to work.

Mac and LINUX are not the same, but BASH (Unix Shell) is common to both of them.

Please strictly adhere to the requirements enumerated in the previous posts and if you have any useful (see prev post) information I would be happy to see it.

TB0ne 07-09-2012 07:52 PM

Quote:

Originally Posted by forumbaba (Post 4723243)
Obviously, you are not understanding the original question, this is an attempt to use "mail" or "mailx" not "sendmail"

Yes, I am. What is not being understood is the ANSWER I gave you. Mail/mailx are the FRONT ENDS....the program needs to know how to route the message to another server, which is what sendmail/postfix are. Not configuring a route to a smarthost on Linux will leave you in the spot you're in. It needs to know WHERE to send a message.

AGAIN:
  • This page has step-by-step directions on how to set up Mac OSX to send mail to Gmail. http://yoavgivati.com/2009/10/let-po...-snow-leopard/
  • You were asked if you had checked the logs, but have refused to answer. That's where error(s) are, that can tell you why things may be getting rejected. Again, no information = no one can help you.
  • You were asked why you were using mailx instead of your standard email client, but have refused to answer. Without knowing what you're trying to accomplish, we are unable to give you options. Again, no information = no one can help you.

Quote:

You obviously have not used either otherwise I don't see why you can't post the changes you made on your LINUX system. This is a very very simple requirement: post changes that TB0ne has made on his linux system that got "mail" or "mailx" to work.
Right...obviously not:
https://www.linuxquestions.org/quest...elp-me-807137/
Quote:

Mac and LINUX are not the same, but BASH (Unix Shell) is common to both of them.
...and yet, not the same. There may be ports of bash on Mac, but there are differences. And because ONE thing is the same, doesn't mean OTHER things are the same.
Quote:

Please strictly adhere to the requirements enumerated in the previous posts and if you have any useful (see prev post) information I would be happy to see it.
Thanks, but no. You won't give any information about what you're seeing, versions, log file info, etc., and seem to be laboring under the misconception that advice given about Linux smarthost configuration somehow applies to Mac OSX. Again...it doesn't. A short answer is you can edit the sendmail.conf file, and add "DS smarthost.domain.com". It's different for postfix, and AGAIN...no idea where any of this is on Mac OSX, or if any of it even applies.

As said in my very first reply: Chances are, you're being blocked from Yahoo/Google by their spam filters, barring any other details. That's still the case, especially if you can send mail to other domains. So, AGAIN...verify this by looking at your logs. Contact them if you're being blocked erroneously, and (best idea): CALL APPLE, since you're paying for support, by buying a Mac and the operating system.


All times are GMT -5. The time now is 01:02 PM.