-
Notifications
You must be signed in to change notification settings - Fork 1.1k
adding heloserver name to the options for email #214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@Mycron Can you test this as I have can not. This pull request addes the option: <ossec_config>
<global>
<helo_server>ossechost01.example.net</helo_server>
</global>
</ossec_config> This still needs to be tested and docs completed, but i will do that once things have been tested. |
Hi, jrossi. As you can see, code not substitute value in variable heloserver. |
My previous comment not working :( With form "Helo <%s>\r\n" i get follow log: |
The snprintf keeps the literal %s. I haven't checked the rest of the code, but it seems like it should be simple enough to skip the define, and snprintf the "Helo " directly. |
AFAIK, this function use format as 'printf'. |
@Mycron What error are you getting. Please see this full pull request as it does the correct thing. |
Hi. |
@jrossi It's possible that my testing was faulty, but I wasn't able to get a test program (made a very simple test case) to work. The %s in the #define never gets replaced in the snprintf. It's definitely not as pretty |
@Mycron @jrossi Please take a look at my commit here: ddpbsd@ad1ece9 I think this fixes the issue (for non-custom email at least). |
@jrossi Is this something you're still interested in? How do we proceed with this? |
I need to make this hack work :) I will look again this week. And test I have vagrant setup to test mail notifications now so that should help. |
Hi, folks Received: from %s (unknown [192.168.14.233]) <---- %s is still there On Tue, Jul 22, 2014 at 4:16 PM, Jeremy Rossi [email protected]
|
@Mycron what compiler and system do you use? |
I finally got around to setting up a testing environment, and I see it too. On Tue, Jul 22, 2014 at 11:37 AM, Vasiliy Shpanskiy <
|
I see the problem with my code, it was changing it for the stupid sms On Tue, Jul 22, 2014 at 12:03 PM, dan (ddp) [email protected] wrote:
|
Ok, I think I got it that time. The server reported as the right hostname On Tue, Jul 22, 2014 at 12:12 PM, dan (ddp) [email protected] wrote:
|
@ossec I updated this pull request and I think it should work now. Can someone look see ? |
I would like to merge it, but github prevents merging cause to some conflicts to #274 . |
Yeapers. Will later today. Thanks |
@@ -167,6 +167,7 @@ int Read_Global(XML_NODE node, void *configp, void *mailp) | |||
char *xml_emailfrom = "email_from"; | |||
char *xml_emailidsname = "email_idsname"; | |||
char *xml_smtpserver = "smtp_server"; | |||
char *xml_heloserver = "helo_server"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you declare this as const char * ?
…si/ossec-hids into fixed-ehlo-name-sendmail-213
@ossec anyone able to take a look see? |
Haven't had a chance to test it. Building now. |
@ddpbsd thank you |
adding heloserver name to the options for email Seems to work for me.
I was looking at this change and it occurs to me wouldn't it make more sense to use the hostname rather than hardcoding 'notify.ossec.net' in the helo banner when mail->heloserver is not explicitly configured? |
That makes sense. I am off in the make file weeds and some other areas. Pull request? |
On Tue, 30 Sep 2014, Jeremy Rossi wrote:
Sure but before I go working on some of that other stuff, I'd like to get Antonio Querubin |
This allow the manual setting of the server name during HELO message. This is to solve #213