For the life of me i cannot get this to work. I've spent almost 4 hours on this and it just does not work. I would like to start hudson job when an e-mail is sent to a specific user. I looked and followed the info mentionned here: http://wiki.hudson-ci.org/display/HUDSON/Building+a+software+project
but still cannot get it to work.
Here is a summary of what i've done so far:
Modified /etc/aliases such that any email going to usr1 trigger the build as in
usr1: "|wget http://hudson-server/hudson/job/myjob/build"
I reconstructed the aliases db after making the above changes and sent out an e-mail to usr1 but nothing happened.
Our emails run on an exchange server. My hudson server sits on a linux box. I tried to use sendmail to do my testing and cannot get it to work. All of the above changes are done on linux. So i'm not sure if the issue here is with sendmail/exchange server or is something i'm missing.
Has anyone got this to work?
I appreciate your help here guys.
Britney
A couple of things to check:
Make sure that running wget http://hudson-server/hudson/job/myjob/build from the command line successfully starts a build. You may have problems if you have security on the server (or the job).
Make sure your exchange server is forwarding the mail for the email address in question to the mail server running on your linux box. If the mail isn't being received there, the wget command in aliases won't ever get executed.
How are you sending the email to usr1? Are you sending it from the same Linux box where the /etc/aliases is located?
To test your setup, on your Linux machine, send your email like this:
mail -s "test email to usr1" usr1#localhost
If the hudson job got executed, then your /etc/aliases setup works.
I suspect your problem could be your Linux box cannot receive emails. See if this works first before you setup the redirection in /etc/aliases. To check for incoming emails, login as usr1 and run mail at the shell prompt.
Related
I have already gone through multiple links before posting and it is not a repeat question.I am not pretty sure that i should post it here or on server fault.
I am trying to configure the SMTP email task but running into error mentioned below.
System.Net.WebException: Unable to connect to the remote server
System.Net.Sockets.SocketException:An attempt was made to access a socket in a way forbidden by its access permissions ipaddress:25
I also tried to verify using powershell, if the SMTP is fine and below are the results:
Using Send-mailmessage : It is working really fine
Using Net.Mail.SmtpClient : I could send email to organization email ids but not outside.
Can someone help me understand where exactly the problem could be.
The problem was Antivirus was blocking the requests from SSIS but was allowing the powershell requests.
I have initiated an email by using utl_mail.send
begin
utl_mail.send(
sender => <<sender mail>>,
recipients => <<recipient mail>>,
message => 'Hello World'
);
commit;
end;
/
But, the mail is not sent to recipient and stays in inetpub/mailroot/queue.
We verified all smtp server settings and looks fine.
We see that port 25 is also open.
Also, we stopped the smtp, cleared the queue, and re-start the smtp again. Still the issue is not resolved.
Kindly help with your valuable answers and experience. Every individual answer is appreciated.
Thanks in advance,
Subbu
Check the Event Viewer for any logs
For this you need to open the Event Viewer and goto Windows
Logs and then Application.
If its a 4.3.1 error then simply it
means the \inetpud\mailroot\ does not have proper permissions to the mailroot folder ,so give it the IIS_IUSRS and also IIS AppPool\"Your App Pool"
If the problem still persists make sure you have the vmstp setup on the local server , for this you need to have smtpclient installed on the server and go to IIS manager (not inetpub) and add a new VSMTP server .
And in the delivery choose the outbound security and then add your gmail or what ever mail you use.
And also make sure you allow port 25 through the firewall
Use telnet to try and confirm all is will by sending a very plain email. Instructions thanks to wiki (http://www.askstudent.com/techtips/how-to-use-telnet-to-send-email-over-port-25-using-smtp/):
Step # 1: First, open a command prompt. To open a command prompt window, click Start, Run and then type in cmd and press Enter. You can also press the +R to open the Run prompt and then type in cmd in the open text box.
Step # 2: You need to know a remote mail server. If you are still in school or working, there is the excellent opportunity to use your University mail server or your company’s mail server for this.
type in telnet RemoteMailServer 25 at the command prompt. The Remote mail server here in this command is the mail server of your school or company. It is usually mailhost..edu or compmail..com or something on those lines. When you press enter, you are shown a quick prompt that you are connecting to the remote mail server.
Step # 3: Introduce yourself to the mail server. Play around a bit.
type in helo mailhost at the command prompt. The mail server responds back with something like this
250 RemoteMailHost. Hello , pleased to meet you.
Step # 4: You can now enter your email address.
type in mail from: your email id # blah.com
The mail server responds back with a 250 … sender ok
Step # 5: You can now enter your receipient’s email address
type in rcpt to: recipient email id # blah.com
The mail server responds back with a “Recipient OK” message
Step # 6: Now, you are ready to type in the body of the email message.
type in data and press enter.
Now, type your message and then finally press Enter. To end your message type in a single period “.” . Your message is now in the queue
Step # 7: To complete and finish the process, type in quit and press enter. The mail server responds with a “Bye” after which you see a “Connection to host lost” message displaye
I recently ran into the same issue on server 2016. SMTP was configured using the IIS6 manager. Turns out, SMTP also had to be configured in IIS proper as well. Basically, I selected SMTP from the IIS server node, entered credentials for my smtp server and saved it. Immediately items that were stuck in the Queue folder started to get delivered. Not sure why this was necessary because I was accessing the relay from a console app, but the solution did work.
I ran into the same issue on Server 2019. My problem was that "From Email Address" used while sending from client wasn't matching what was setup on SMTP server. Once the client started sending with the correct "From Email Address", the mails were no longer stuck in the Queue.
my old father is using ubuntu-gnome. He has no static ip address. In order to perform remote administration, I need to know his ip. I was using dyndns free account (configuration in the adsl modem), but this will stop working in a couple of days.
I would like to run a script each time he logs in to publish his ip on my website. I have tried to put a script on the boot, but the network is not available. It seems that it is gnome 3 that starts the network, but I do not know much about gnome 3.
How should I do to have my script run automatically as soon as the network is available ?
One possible non-elegant solution for this is to put your script in his cron to run every X minutes :)
Looking to mine /etc/NetworkManager/ looks like there is a folder dispatcher.d that I think it'll do what you want. Just experiment with a bash/perl/python w/e script in there set the permission appropriately. You can find the UUID in the system-connections/ folder. More information is available in man networkmanager.
EDIT: Look what I found: https://askubuntu.com/questions/13963/call-script-after-connecting-to-a-wireless-network. Seems like this is exactly what you want.
The easiest way is to use another dynamic DNS service. I used to use my own. You could also put curl or wget command to cron or create a systemd service that will call that command periodically. As a target you would have to use your machine with a web server where you can see the IP in your logs.
It is not Gnome that connects the network, it is a system service called NetworkManager. It tries to connect at boot if possible. In some cases it waits for wireless signal, in other cases it waits for a user password. I recently verified that in Fedora, NetworkManager properly implements the systemd's network-online.target but it may have yet to be fixed in other distributions, see the upstream bug report.
https://bugzilla.gnome.org/show_bug.cgi?id=728965
If you want to run a system service just after boot, you need to use:
[Unit]
...
Wants=network-online.target
After=network-online.target
You could also just run a script that calls nm-online at the beginning to wait for the network connectivity if you can expect the connectivity to come up in reasonable time, otherwise it times out. Such a script can be run from any environment including a user session.
And, as noted already, you can put a script into /etc/NetworkManager/dispatcher.d that will be called on any network configuration change and such a script can then filter connection up events and start the notification script.
I have some problem with my wso2-esb, it is on a remote linux server and seems to be succesfully started:
But when I try to access it, does not work:
I am not any expert in servers, it is the first time I do such thing, so I probably missed some basic step or something you might know.
Please suggest
Thanks a lot
SOLVED the server was firewalled, I had to add an exception to access it
Two things might be happening.
IE is masking an HTTP error response with its friendly errors.
Since this is a remote server, iptables could be running on the server, or there is another firewall in the way blocking that port.
To diagnose, I would start by disabling friendly error messages in IE, or using a different browser that doesn't do this. Instructions on how to disable it here: http://technet.microsoft.com/en-us/library/cc778248(v=ws.10).aspx
Next, if that doesn't resolve it, I would try running curl/wget on the server, and requesting the displayed URL. curl can be run with curl example.com and wget wget -qO- example.com, both will displayed the returned data (if any) on the terminal. If one returns a command not found, try the other. If that doesn't work, something is going on with your server. If it's returning something that looks like an error (e.g. a sever generated error page), I'd look into that too at this step.
If you appear to have connectivity issues, you can see if there's any iptables rules in place by running iptables -L on the server. A DROP all under Chain INPUT would cause this. You can read more about iptables here, and how to set it up for your needs here: https://help.ubuntu.com/community/IptablesHowTo (Even if you're not using ubuntu, this will still work for you, look in the "Allowing Incoming Traffic on Specific Ports" section, there's an example there you would need to adopt slightly for the non-standard port the server is running on). If there's an external firewall preventing access, you would need to talk with whoever is managing the sever.
Its seems some network issue. Can you try to ping the IP. If you cannt ping that means the machine is not reachable.
Regards,
/nuwan
I have a server with Plesk installed.
On that I've created a domain, my-domain.com, and added and e-mail account noreply#my-domain.com with access to SMTP for sending e-mails.
With PHPMailer or Swift Mailer I am able to send via the SMTP account noreply#my-domain.com whenever the from address is outside the my-domain.com, for example info#my-second-domain.com.
Whenever I'm using an e-mail address that ends on #my-domain.com it fails.
I've tried to look in the /usr/local/psa/var/log/maillog file, but it only stores the mails that doesn't fail.
Can someone help me figure out where the problems is?
You can try this:
Delete the related domain in the qmail file /var/qmail/control/virtualdomains
Then reload/restart qmail. Now it should work.
More technical background at http://forum.parallels.com/pda/index.php/t-93222.html
Benjamin answer didn't work on my installation (Plesk 11.5), but I found another solution:
just turn off the mail service itself. It might not be the solution for everyone but it was for me (my domain's mx records pointing to another server, with some scripts sending emails here and there).
You can turn off the mail service fairly easily using Plesk GUI.
Then uncheck
However, this won't turn it off for subdomains and secondary domains you might have. No problem, just log in with ssh and run this command:
/usr/local/psa/bin/domain -u mydomain.example.com -mail_service false
And if one day you decide you want to turn it back on just replace false by true.