Re: Mail program
Greetings, Refr Bruhl! > I found a resolution to my email problem. > I had to reinstall ssmtp > I discovered where I work was blocking port 25. This was removed for me Try the alternate mail submission port (587/tcp) or less standard 2525/tcp which is often configured to work. -- WBR, Andrey Repin (anrdae...@freemail.ru) 02.07.2010, <14:12> Sorry for my terrible english... -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: Mail program
Team I found a resolution to my email problem. I had to reinstall ssmtp I discovered where I work was blocking port 25. This was removed for me I had to configure a basic ssmtp.conf file in /etc/ssmtp Durng the course of the compiling issues for mailutils (( see the libtools thread )) Cyrille Lefevre made a mailx script included below that plugs into sendmail or ssmtp. I am happy to report this script works well in cygwin and aix 6.1 environments Thanks to all who helped with this issue sample ssmtp.conf file # cat /etc/ssmtp/ssmtp.conf # # /etc/ssmtp.conf -- a config file for sSMTP sendmail. # # The person who gets all mail for userids < 1000 root=postmaster # The place where the mail goes. The actual machine name is required # no MX records are consulted. Commonly mailhosts are named mail.domain.com # The example will fit if you are in domain.com and you mailhub is so named. mailhub=your.mail.host.fully.qualified.name.com # Where will the mail seem to come from? #rewriteDomain=localhost.localdomain # The full hostname hostname=your.pc.fully.qualified.name.com mailx script posted with permission #!/usr/bin/ksh# #!ident@(#) mailx.sh 1.1 (cyrille.lefevre-lists%nos...@laposte.net.invalid) Wed Jun 30 22:35:24 2010 # supprimer "%nospam" et ".invalid" pour me repondre. # remove "%nospam" and ".invalid" to answer me. # # Copyright (c) 2010 Cyrille Lefevre. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright #notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright #notice, this list of conditions and the following disclaimer in #the documentation and/or other materials provided with the #distribution. # 3. The name of the authors and contributors may not be used to #endorse or promote products derived from this software without #specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED # TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A # PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS # OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF # USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. usage () { echo 'usage: mailx [-dv] [-F name] [-r from] [-s subject] <-t | [-b bcc] [-c cc] [to...]> at least one of -t, -b, -c or to... must be specified.' >&2 exit $1 } # sendmail='/usr/sbin/sendmail' sendmail='/usr/sbin/ssmtp' bcc= bccsep='BCC: ' cc= ccsep='CC: ' name= namesep='-F ' from= fromsep='-f ' subject='(no subject)' subjectsep='Subject: ' debug= toopt= verbose= undisclosed='undisclosed-recipients:;' while getopts 'b:c:dF:hr:s:tv' c; do case ${c} in 'b')bcc="${bcc}${bccsep}${OPTARG}"; bccsep=',' ;; 'c')cc="${cc}${ccsep}${OPTARG}"; ccsep=',' ;; 'd')debug='-d' ;; 'F')name="${namesep}'${OPTARG}'" ;; 'h')usage 0 ;; 'r')from="${fromsep}'${OPTARG}'" ;; 's')subject="${OPTARG}" ;; 't')toopt='-t' ;; 'v')verbose='-v' ;; *)usage 1 ;; esac done shift $(($OPTIND-1)) nl=' ' toarg= to= tosep= if [[ -n ${toopt} ]]; then cc= bcc= else if [[ $# = 0 ]]; then if [[ -n ${cc}${bcc} ]]; then set -- "${undisclosed}" else usage 1 fi else for arg; do toarg="${toarg}${tosep}'${arg}'"; tosep=' '; done fi tosep='To: ' for arg; do to="${to}${tosep}${arg}"; tosep=','; done [[ -n ${to} ]] && to="${to}${nl}" [[ -n ${cc} ]] && cc="${cc}${nl}" [[ -n ${bcc} ]] && bcc="${bcc}${nl}" fi [[ -n ${subject} ]] && subject="${subjectsep}${subject}${nl}" read -r line nl1="${nl}" nl2= case ${line} in *':'*) case ${line%%:*} in *' '*) ;; *) nl1= nl2="${nl}" ;; esac ;; '') nl1= nl2= ;; esac if [[ -n ${debug} ]]; then sendmail=sendmail sendmail () { echo sendmail "$@"; cat; } fi eval ${sendmail} ${toopt} ${verbose} ${name} ${from} ${toarg} << EOF ${subject}${to}${cc}${bcc}${nl1}${line}${nl2}$(cat) EOF #!eof -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: Mail program
Le 01/07/2010 22:06, Reid Thompson a écrit : On Wed, Jun 30, 2010 at 10:07:19AM -0700, Refr Bruhl wrote: when you say I really need the ability to redirect a text stream to a pipe to mail. > do you mean ala $ cat file.txt | mailprogram UUOC, ala mailprogram < file.txt :-P Regards, Cyrille Lefevre -- mailto:cyrille.lefevre-li...@laposte.net -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: Mail program
On Wed, Jun 30, 2010 at 10:07:19AM -0700, Refr Bruhl wrote: > when you say > I really need the ability to redirect a text stream to a pipe to mail. do you mean ala $ cat file.txt | mailprogram -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: Mail program
Re: Cyrille Lefevre wrote: > even w/ mailutils, you'il probably need a sendmail which is provided > by ssmtp or msmtp... No,a seperately loaded sendmail would not be necessary D. Henman has told me that, the Gnu mailutils suite should have everything needed. It has a "sendmail" daemon, a "mail" program to send & receive mail, and a "movemail". For example I could use movemail to fetch mail messages from a yahoo or gmail pop account, similar to the function "fetchmail" performs. regards P.S. I use Gnu Mailutils, Gnu MH (Gnu Mail Handler) which enable emacs to use the MH-E functionality to "compose/edit/read and store" e-mail messages. Once used to emacs' MH-E for mail handling, I think most emacs users would really prefer it over stand ard firebird or explorer type message handling. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: Mail program
Le 30/06/2010 19:07, Refr Bruhl a écrit : I really need the ability to redirect a text stream to a pipe to mail. did you take a look to the attached script ? I call it mailx, but mail will do it also :-) even w/ mailutils, you'il probably need a sendmail which is provided by ssmtp or msmtp... Regards, Cyrille Lefevre -- mailto:cyrille.lefevre-li...@laposte.net -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: Mail program
Greetings Cyrille: You asked which error I was getting on compiling the mailutils. I'e included it below. Interestingly enough when I compile mailutils with a --disable-cxx option I get the shared library error message/warning again. Here is the url for the mailutils package. http://www.gnu.org/software/mailutils/#downloading I really need the ability to redirect a text stream to a pipe to mail. I feel if I can get mailutils to compile successfully then I have reached my goal of emulating an aix environment - Forwarded Message From: Refr Bruhl To: bug-mailut...@gnu.org Sent: Tue, June 29, 2010 9:44:15 AM Subject: Fatal error in addr.cc under cygwin 1.7.5 Team I am getting compile errors for the mailutils package under cygwin. I am using cygwin 1.7.5 I have found a reoccurring error in the config.log. While its reoccurring I don't think its related to the compile errors. I I have included it below The fatal error is in the addr.cc file as shown below When I compile usig the --disable-cxx option the compile works but I don't get mail when involjkng the mail binary. is there a spool directory that needs created? Some other setup needed? Any help is appreciated Thanks! -Rob ## - ## ## Platform. ## ## - ## hostname = lkvn108 uname -m = i686 uname -r = 1.7.5(0.225/5/3) uname -s = CYGWIN_NT-5.1 uname -v = 2010-04-12 19:07 /usr/bin/uname -p = unknown /bin/uname -X = unknown /bin/arch = i686 /usr/bin/arch -k = unknown /usr/convex/getsysinfo = unknown /usr/bin/hostinfo = unknown /bin/machine = unknown /usr/bin/oslevel = unknown /bin/universe = unknown config.log error msage conftest.c:10:28: error: ac_nonexistent.h: No such file or directory configure:4916: $? = 1 configure: failed program was: | /* confdefs.h. */ | #define PACKAGE_NAME "GNU Mailutils" | #define PACKAGE_TARNAME "mailutils" | #define PACKAGE_VERSION "2.1" | #define PACKAGE_STRING "GNU Mailutils 2.1" | #define PACKAGE_BUGREPORT "bug-mailut...@gnu.org" | #define PACKAGE "mailutils" | #define VERSION "2.1" | /* end confdefs.h. */ | #include Actual compile errors *** Warning: This system can not link to static lib archive ../mailbox/libmailutils.la. *** I have the capability to make that library automatically link in when *** you link to this library. But I can only do this if you have a *** shared version of the library, which you do not appear to have. libtool: link: warning: undefined symbols not allowed in i686-pc-cygwin shared libraries This is the fatal error: Making all in cpp make[3]: Entering directory `/downloads/mail/mailutils-2.1/examples/cpp' g++ -g -O2 -DSYSCONFDIR=\"/usr/local/etc\" addr.cc -o addr addr.cc:23:37: error: mailutils/cpp/mailutils.h: No such file or directory addr.cc:26: error: ‘mailutils’ is not a namespace-name addr.cc:26: error: expected namespace-name before ‘;’ token addr.cc: In function ‘int parse(const char*)’: addr.cc:31: error: ‘set_user_email_domain’ was not declared in this scope addr.cc:34: error: ‘Address’ was not declared in this scope addr.cc:34: error: expected `;' before ‘address’ addr.cc:35: error: ‘address’ was not declared in this scope addr.cc:57: error: expected type-specifier before ‘Exception’ addr.cc:57: error: expected `)' before ‘&’ token addr.cc:57: error: expected `{' before ‘&’ token addr.cc:57: error: ‘e’ was not declared in this scope addr.cc:57: error: expected `;' before ‘)’ token make[3]: *** [addr] Error 1 make[3]: Leaving directory `/downloads/mail/mailutils-2.1/examples/cpp' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/downloads/mail/mailutils-2.1/examples' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/downloads/mail/mailutils-2.1' make: *** [all] Error 2 - Original Message From: Cyrille Lefevre To: cygwin@cygwin.com Sent: Tue, June 29, 2010 9:49:32 PM Subject: Re: Mail program Le 29/06/2010 14:24, Refr Bruhl a écrit : > > > Good Morning > > I am in need of of a mail program similar to the mail found in AIX. I am > emulating an AIX environment. > > I've installed the email, ssmtp and other email apps in the email. I get a > segmentation fault for email > > I like email as it seems to accept the same parameters and funcitonality as > the AIX mail app. I have a multitude of scripts that use the format: > > echo ${MESSAGE} | mail -s '${SUBJECT}' ${EMAIL} > > Where ${EMAIL} is a comma delimited list of addresses. > > I've compiled the mailutils from gnu but I get a different error there which > I'll take up with the buildlist-mailut...@gnu.org which error ? > Anyone got any ideas on how to get email to work without a segmenta
Re: Mail program
Le 29/06/2010 14:24, Refr Bruhl a écrit : Good Morning I am in need of of a mail program similar to the mail found in AIX. I am emulating an AIX environment. I've installed the email, ssmtp and other email apps in the email. I get a segmentation fault for email I like email as it seems to accept the same parameters and funcitonality as the AIX mail app. I have a multitude of scripts that use the format: echo ${MESSAGE} | mail -s '${SUBJECT}' ${EMAIL} Where ${EMAIL} is a comma delimited list of addresses. I've compiled the mailutils from gnu but I get a different error there which I'll take up with the buildlist-mailut...@gnu.org which error ? Anyone got any ideas on how to get email to work without a segmentation fault? ah! this one ? do you know the origin ? Where can I obtain the source for email? I've pretty much hit cygwin head first and am not as familiar with it as I am with AIX. My apologies for the newbie questions. let's try ssmtp w/ /etc/ssmtp/ssmtp.conf configured like this : mailhub=smtp. FromLineOverride=YES hostname=smtp. rewriteDomain= root=postmaster AuthUser= AuthPass= AuthMethod=LOGIN and w/ /etc/ssmtp/revaliases : ::smtp. don't forget to run ssmtp-config alternative w/ msmtp and /etc/msmtprc : account host smtp. auth login password account : from user account : from user account default : don't forget to run msmtp-config yet another alternative w/ email : /usr/bin/email \ -r smtp. \ -m LOGIN \ -u \ -i \ -n "" \ -f \ ... then, for both ssmtp/msmtp, the attached script should work ! I left you the implementation of the -a (attachment) option :-) Regards, Cyrille Lefevre -- mailto:cyrille.lefevre-li...@laposte.net #!/usr/bin/ksh usage () { echo 'usage: mailx [-dv] [-F name] [-r from] [-s subject] <-t | [-b bcc] [-c cc] [to...]> at least one of -t, -b, -c or to... must be specified.' >&2 exit $1 } sendmail='/usr/sbin/sendmail' bcc= bccsep='BCC: ' cc= ccsep='CC: ' name= namesep='-F ' from= fromsep='-f ' subject='(no subject)' subjectsep='Subject: ' debug= toopt= verbose= undisclosed='undisclosed-recipients:;' while getopts 'b:c:dF:hr:s:tv' c; do case ${c} in 'b')bcc="${bcc}${bccsep}${OPTARG}"; bccsep=',' ;; 'c')cc="${cc}${ccsep}${OPTARG}"; ccsep=',' ;; 'd')debug='-d' ;; 'F')name="${namesep}'${OPTARG}'" ;; 'h')usage 0 ;; 'r')from="${fromsep}'${OPTARG}'" ;; 's')subject="${OPTARG}" ;; 't')toopt='-t' ;; 'v')verbose='-v' ;; *) usage 1 ;; esac done shift $(($OPTIND-1)) nl=' ' toarg= to= tosep= if [[ -n ${toopt} ]]; then cc= bcc= else if [[ $# = 0 ]]; then if [[ -n ${cc}${bcc} ]]; then set -- "${undisclosed}" else usage 1 fi else for arg; do toarg="${toarg}${tosep}'${arg}'"; tosep=' '; done fi tosep='To: ' for arg; do to="${to}${tosep}${arg}"; tosep=','; done [[ -n ${to} ]] && to="${to}${nl}" [[ -n ${cc} ]] && cc="${cc}${nl}" [[ -n ${bcc} ]] && bcc="${bcc}${nl}" fi [[ -n ${subject} ]] && subject="${subjectsep}${subject}${nl}" read -r line nl1="${nl}" nl2= case ${line} in *':'*) case ${line%%:*} in *' '*) ;; *) nl1= nl2="${nl}" ;; esac ;; '') nl1= nl2= ;; esac if [[ -n ${debug} ]]; then sendmail=sendmail sendmail () { echo sendmail "$@"; cat; } fi eval ${sendmail} ${toopt} ${verbose} ${name} ${from} ${toarg} << EOF ${subject}${to}${cc}${bcc}${nl1}${line}${nl2}$(cat) EOF #!eof -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: Mail program
On 6/29/2010 11:11 AM, Refr Bruhl wrote: I did some more testing with email and the blank/verbose message options Says I am missing /usr/lib/sendmail Where do I obtain this library? Its not in the setup.exe options I recommend installing the 'ssmtp' package and then running 'ssmtp-config'. -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 216 Dalton Rd. (508) 893-9889 - FAX Holliston, MA 01746 _ A: Yes. Q: Are you sure? A: Because it reverses the logical flow of conversation. Q: Why is top posting annoying in email? -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: Mail program
On 6/29/2010 8:24 AM, Refr Bruhl wrote: Good Morning I am in need of of a mail program similar to the mail found in AIX. I am emulating an AIX environment. I've installed the email, ssmtp and other email apps in the email. I get a segmentation fault for email Anyone got any ideas on how to get email to work without a segmentation fault? It works for me. It does seem like you'll need to debug this a bit to see if you can figure out why it's crashing on you. It's also at least possible that this could be interference from something else, depending on the details of the crash you're seeing. You might look for <http://cygwin.com/acronyms/#BLODA> or possibly even look to see if 'rebaseall' from the rebase package will help. Where can I obtain the source for email? I've pretty much hit cygwin head first and am not as familiar with it as I am with AIX. My apologies for the newbie questions. All packages have source available through 'setup.exe'. You can download it by checking the 'Src?' column. -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 216 Dalton Rd. (508) 893-9889 - FAX Holliston, MA 01746 _ A: Yes. Q: Are you sure? A: Because it reverses the logical flow of conversation. Q: Why is top posting annoying in email? -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: Mail program
I did some more testing with email and the blank/verbose message options Says I am missing /usr/lib/sendmail Where do I obtain this library? Its not in the setup.exe options crth at lkvn108 in /downloads/mail/mailutils-2.1 # email -b -V refr_br...@yahoo.com Sending "(No Subject)" |**| 100% of 180 Bytes crth at lkvn108 in /downloads/mail/mailutils-2.1 # /bin/sh: /usr/lib/sendmail: No such file or directory - Original Message From: Refr Bruhl To: cygwin@cygwin.com Sent: Tue, June 29, 2010 7:24:58 AM Subject: Mail program Good Morning I am in need of of a mail program similar to the mail found in AIX. I am emulating an AIX environment. I've installed the email, ssmtp and other email apps in the email. I get a segmentation fault for email I like email as it seems to accept the same parameters and funcitonality as the AIX mail app. I have a multitude of scripts that use the format: echo ${MESSAGE} | mail -s '${SUBJECT}' ${EMAIL} Where ${EMAIL} is a comma delimited list of addresses. I've compiled the mailutils from gnu but I get a different error there which I'll take up with the buildlist-mailut...@gnu.org Anyone got any ideas on how to get email to work without a segmentation fault? Where can I obtain the source for email? I've pretty much hit cygwin head first and am not as familiar with it as I am with AIX. My apologies for the newbie questions. Thanks! -Rob -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Mail program
Good Morning I am in need of of a mail program similar to the mail found in AIX. I am emulating an AIX environment. I've installed the email, ssmtp and other email apps in the email. I get a segmentation fault for email I like email as it seems to accept the same parameters and funcitonality as the AIX mail app. I have a multitude of scripts that use the format: echo ${MESSAGE} | mail -s '${SUBJECT}' ${EMAIL} Where ${EMAIL} is a comma delimited list of addresses. I've compiled the mailutils from gnu but I get a different error there which I'll take up with the buildlist-mailut...@gnu.org Anyone got any ideas on how to get email to work without a segmentation fault? Where can I obtain the source for email? I've pretty much hit cygwin head first and am not as familiar with it as I am with AIX. My apologies for the newbie questions. Thanks! -Rob -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple