mirror of
https://github.com/beard7n/bsdports.git
synced 2026-04-17 14:01:19 +02:00
create bsd12 branch
This commit is contained in:
40
net/libspf2/files/patch-src_spf__example_spf__example.c
Normal file
40
net/libspf2/files/patch-src_spf__example_spf__example.c
Normal file
@@ -0,0 +1,40 @@
|
||||
--- src/spf_example/spf_example.c.orig Mon Mar 28 14:17:20 2005
|
||||
+++ src/spf_example/spf_example.c Mon Mar 28 14:22:46 2005
|
||||
@@ -206,7 +206,7 @@
|
||||
* destroyed when you are finished.
|
||||
*/
|
||||
|
||||
- spf_server = SPF_server_new(SPF_DNS_CACHE, 1);
|
||||
+ spf_server = SPF_server_new(SPF_DNS_CACHE, opt_debug);
|
||||
|
||||
if (spf_server == NULL) {
|
||||
fprintf( stderr, "SPF_create_config failed.\n" );
|
||||
@@ -264,10 +264,24 @@
|
||||
* message.
|
||||
*/
|
||||
|
||||
- if ( SPF_request_set_helo_dom( spf_request, opt_helo ) ) {
|
||||
- printf( "Invalid HELO domain.\n" );
|
||||
- res = 255;
|
||||
- goto error;
|
||||
+ if (opt_helo == NULL) {
|
||||
+ if (opt_sender != NULL) {
|
||||
+ if (strstr(opt_sender, "@") != NULL) {
|
||||
+ opt_helo = strdup(strstr(opt_sender, "@") + 1);
|
||||
+
|
||||
+ if ( SPF_request_set_helo_dom( spf_request, opt_helo ) ) {
|
||||
+ printf( "Invalid HELO domain.\n" );
|
||||
+ res = 255;
|
||||
+ goto error;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ } else {
|
||||
+ if ( SPF_request_set_helo_dom( spf_request, opt_helo ) ) {
|
||||
+ printf( "Invalid HELO domain.\n" );
|
||||
+ res = 255;
|
||||
+ goto error;
|
||||
+ }
|
||||
}
|
||||
|
||||
/*
|
||||
Reference in New Issue
Block a user