NOQUEUE: reject: RCPT Relay access denied on AWS ubuntu - amazon-ec2

I have installed Postfix on AWS ubuntu(18.04).
When I am trying to send email from my EmailId to configured postfix mail server i.e ceo#visitormanagementsystem.co.in, getting below log:
Sep 30 15:12:05 mailer postfix/smtpd[17712]: connect from
mail-pg1-f178.google.com[209.85.215.178] Sep 30 15:12:06 mailer
postfix/smtpd[17712]: NOQUEUE: reject: RCPT from
mail-pg1-f178.google.com[209.85.215.178]: 454 4.7.1
: Relay access denied;
from= to=
proto=ESMTP helo=
My /etc/postfix/mail.cf has following configuration:
smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)
biff = no
append_dot_mydomain = no
readme_directory = no
mailbox_size_limit = 0
recipient_delimiter = + .
inet_interfaces = all
inet_protocols = all
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
compatibility_level = 2
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = mailer.visitormanagementsystem.co.in
myorigin = /etc/mailname
mydestination = $myhostname, mailer.visitormanagementsystem.co.in, localhost.visitormanagementsystem.co.in, localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128

You're only defining how users can relay through your postfix instance, not how you can receive mail. You'll need to configure the other smtpd transport types to ensure mail can be delivered.
smtpd_recipient_restrictions
smtpd_client_restrictions
smtpd_sender_restrictions

Related

Can't connect to Windows host via Ansible (certificate authentication)

Hello Im implementing a ansible solution to many windows host, I'm using certificate authentication and winrm
As you can see on the following screenshoot it's working for the most of the host, but is falling for others
( I ran the same script to configure winrm in all the servers)
enter image description here
this is the error:
<server_ip> | UNREACHABLE! => {
"changed": false,
"msg": "certificate: HTTPSConnectionPool(host='<server_ip>', port=5986): Max retries exceeded with url: /wsman (Caused by ConnectTimeoutError(<urllib3.connection.VerifiedHTTPSConnection object at 0x7f7b20cacdc0>, 'Connection to <server_ip> timed out. (connect timeout=30)'))",
"unreachable": true
}
winrm config
winrm get winrm/config/Service:
Service
RootSDDL = O:NSG:BAD:P(A;;GA;;;BA)(A;;GR;;;IU)S:P(AU;FA;GA;;;WD)(AU;SA;GXGW;;;WD)
MaxConcurrentOperations = 4294967295
MaxConcurrentOperationsPerUser = 1500
EnumerationTimeoutms = 240000
MaxConnections = 300
MaxPacketRetrievalTimeSeconds = 120
AllowUnencrypted = false
Auth
Basic = false
Kerberos = true
Negotiate = true
Certificate = true
CredSSP = true
CbtHardeningLevel = Relaxed
DefaultPorts
HTTP = 5985
HTTPS = 5986
IPv4Filter = *
IPv6Filter = *
EnableCompatibilityHttpListener = false
EnableCompatibilityHttpsListener = false
CertificateThumbprint
AllowRemoteAccess = true
winrm get winrm/config/Winrs
Winrs
AllowRemoteShellAccess = true
IdleTimeout = 7200000
MaxConcurrentUsers = 2147483647
MaxShellRunTime = 2147483647
MaxProcessesPerShell = 2147483647
MaxMemoryPerShellMB = 2147483647
MaxShellsPerUser = 2147483647

Orderer connection refused Hyperledger Fabric

I am trying to run the fabric-sample with tls settings removed.
The networks and all containers are running good without any errors but when I , try to run the channel creation command from cli, it is unable to connect to orderer container.
CLI Definition:-
version: '2'
services:
cli:
container_name: cli
image: hyperledger/fabric-tools:latest
tty: true
stdin_open: true
environment:
- GOPATH=/opt/gotpath
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- FABRIC_LOGGING_SPEC=INFO
- CORE_PEER_ID=cli
- CORE_PEER_ADDRESS=peer0.org1.example.com:7051
- CORE_PEER_LOCALMSPID=Org1MSP
- CORE_PEER_TLS_ENABLED=false
- CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin#org1.example.com/msp
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
command: /bin/bash
volumes:
- /var/run/:/host/var/run
- ../../chaincode/:/opt/gopath/src/github.com/hyperledger/fabric/peer/chaincode/
- ../../chaincode-advanced/:/opt/gopath/src/github.com/hyperledger/fabric/peer/chaincode-advanced/
- ../crypto-config:/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/
- ../scripts:/opt/gopath/src/github.com/hyperledger/fabric/peer/scripts/
- ../channel-artifacts:/opt/gopath/src/github.com/hyperledger/fabric/peer/channel-artifacts
Orderer Definition:-
version: '2'
services:
orderer-base:
image: hyperledger/fabric-orderer:latest
environment:
- FABRIC_LOGGING_SPEC=INFO
- ORDERER_GENERAL_LISTENADDRESS:0.0.0.0
- ORDERER_GENERAL_GENESISMETHOD=file
- ORDERE_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block
- ORDERER_GENERAL_LOCALMSPID=OrdererMSP
- ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp
- ORDERER_GENERAL_TLS_ENABLED=false
working_dir: /opt/gopath/src/github.com/hyperledger/fabric
command: orderer
Command failing to execute-
peer channel create -o orderer.example.com:7050 -c byfn-fabric-channel -f ./channel-artifacts/channel.tx
Error:-
root#b7a8ed102a7b:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer channel create -o orderer.example.com:7050 -c byfn-fabric-channel -f ./channel-artifacts/channel.tx
Error: failed to create deliver client: orderer client failed to connect to orderer.example.com:7050: failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp 172.21.0.2:7050: connect: connection refused"
Since TLS if off, certificates configuration should not be problem.Although cli container is able to ping orderer container.
But orderer on port 7050 is refusing connection, eventhough services on that port is running inside orderer.
Orderer Logs:-
2020-02-14 00:10:28.164 UTC [localconfig] completeInitialization -> INFO 001 Kafka.Version unset, setting to 0.10.2.0
2020-02-14 00:10:28.175 UTC [orderer.common.server] prettyPrintStruct -> INFO 002 Orderer config values:
General.LedgerType = "file"
General.ListenAddress = "127.0.0.1"
General.ListenPort = 7050
General.TLS.Enabled = false
General.TLS.PrivateKey = "/etc/hyperledger/fabric/tls/server.key"
General.TLS.Certificate = "/etc/hyperledger/fabric/tls/server.crt"
General.TLS.RootCAs = [/etc/hyperledger/fabric/tls/ca.crt]
General.TLS.ClientAuthRequired = false
General.TLS.ClientRootCAs = []
General.Cluster.ListenAddress = ""
General.Cluster.ListenPort = 0
General.Cluster.ServerCertificate = ""
General.Cluster.ServerPrivateKey = ""
General.Cluster.ClientCertificate = ""
General.Cluster.ClientPrivateKey = ""
General.Cluster.RootCAs = []
General.Cluster.DialTimeout = 5s
General.Cluster.RPCTimeout = 7s
General.Cluster.ReplicationBufferSize = 20971520
General.Cluster.ReplicationPullTimeout = 5s
General.Cluster.ReplicationRetryTimeout = 5s
General.Cluster.ReplicationBackgroundRefreshInterval = 5m0s
General.Cluster.ReplicationMaxRetries = 12
General.Cluster.SendBufferSize = 10
General.Cluster.CertExpirationWarningThreshold = 168h0m0s
General.Cluster.TLSHandshakeTimeShift = 0s
General.Keepalive.ServerMinInterval = 1m0s
General.Keepalive.ServerInterval = 2h0m0s
General.Keepalive.ServerTimeout = 20s
General.ConnectionTimeout = 0s
General.GenesisMethod = "file"
General.GenesisProfile = "SampleInsecureSolo"
General.SystemChannel = "test-system-channel-name"
General.GenesisFile = "/var/hyperledger/orderer/orderer.genesis.block"
General.Profile.Enabled = false
General.Profile.Address = "0.0.0.0:6060"
General.LocalMSPDir = "/var/hyperledger/orderer/msp"
General.LocalMSPID = "OrdererMSP"
General.BCCSP.ProviderName = "SW"
General.BCCSP.SwOpts.SecLevel = 256
General.BCCSP.SwOpts.HashFamily = "SHA2"
General.BCCSP.SwOpts.Ephemeral = false
General.BCCSP.SwOpts.FileKeystore.KeyStorePath = "/var/hyperledger/orderer/msp/keystore"
General.BCCSP.SwOpts.DummyKeystore =
General.BCCSP.SwOpts.InmemKeystore =
General.BCCSP.PluginOpts =
General.Authentication.TimeWindow = 15m0s
General.Authentication.NoExpirationChecks = false
FileLedger.Location = "/var/hyperledger/production/orderer"
FileLedger.Prefix = "hyperledger-fabric-ordererledger"
RAMLedger.HistorySize = 1000
Kafka.Retry.ShortInterval = 5s
Kafka.Retry.ShortTotal = 10m0s
Kafka.Retry.LongInterval = 5m0s
Kafka.Retry.LongTotal = 12h0m0s
Kafka.Retry.NetworkTimeouts.DialTimeout = 10s
Kafka.Retry.NetworkTimeouts.ReadTimeout = 10s
Kafka.Retry.NetworkTimeouts.WriteTimeout = 10s
Kafka.Retry.Metadata.RetryMax = 3
Kafka.Retry.Metadata.RetryBackoff = 250ms
Kafka.Retry.Producer.RetryMax = 3
Kafka.Retry.Producer.RetryBackoff = 100ms
Kafka.Retry.Consumer.RetryBackoff = 2s
Kafka.Verbose = false
Kafka.Version = 0.10.2.0
Kafka.TLS.Enabled = false
Kafka.TLS.PrivateKey = ""
Kafka.TLS.Certificate = ""
Kafka.TLS.RootCAs = []
Kafka.TLS.ClientAuthRequired = false
Kafka.TLS.ClientRootCAs = []
Kafka.SASLPlain.Enabled = false
Kafka.SASLPlain.User = ""
Kafka.SASLPlain.Password = ""
Kafka.Topic.ReplicationFactor = 3
Debug.BroadcastTraceDir = ""
Debug.DeliverTraceDir = ""
Consensus = map[SnapDir:/var/hyperledger/production/orderer/etcdraft/snapshot WALDir:/var/hyperledger/production/orderer/etcdraft/wal]
Operations.ListenAddress = "127.0.0.1:8443"
Operations.TLS.Enabled = false
Operations.TLS.PrivateKey = ""
Operations.TLS.Certificate = ""
Operations.TLS.RootCAs = []
Operations.TLS.ClientAuthRequired = false
Operations.TLS.ClientRootCAs = []
Metrics.Provider = "disabled"
Metrics.Statsd.Network = "udp"
Metrics.Statsd.Address = "127.0.0.1:8125"
Metrics.Statsd.WriteInterval = 30s
Metrics.Statsd.Prefix = ""
2020-02-14 00:10:28.392 UTC [orderer.common.server] extractSysChanLastConfig -> INFO 003 Bootstrapping because no existing channels
2020-02-14 00:10:28.402 UTC [fsblkstorage] newBlockfileMgr -> INFO 004 Getting block information from block storage
2020-02-14 00:10:28.598 UTC [orderer.commmon.multichannel] Initialize -> INFO 005 Starting system channel 'byfn-sys-channel' with genesis block hash 46b45898fb2fadca600c5b423af9806a284c0d3c253917eca860c35b55935428 and orderer type solo
2020-02-14 00:10:28.598 UTC [orderer.common.server] Start -> INFO 006 Starting orderer:
Version: 1.4.4
Commit SHA: 7917a40
Go version: go1.12.12
OS/Arch: linux/amd64
2020-02-14 00:10:28.599 UTC [orderer.common.server] Start -> INFO 007 Beginning to serve requests

How to send UDP packet in a wireless network from multi-host simultaneously in INET/Veins_inet

Greeting all,
I am trying to edit Veins_inet (square example)to the following scenario:
node#1,2 send UDP packet to node#0 at time 15s and stop sending at 18s.
but when I do that the UDP packet not sent simultaneously!
How can I make the two node target node#0 simultaneously?
here part of .ini file
# UDPBasicApp
MyScenario.node[1..2].numUdpApps = 2
MyScenario.node[1..2].udpApp[0].typename = "UDPBasicApp"
MyScenario.node[1..2].udpApp[0].destAddresses = "224.0.0.1"
MyScenario.node[1..2].udpApp[0].multicastInterface = "wlan0"
MyScenario.node[1..2].udpApp[0].joinLocalMulticastGroups = true
#MyScenario.node[1..2].udpApp[0].localPort = 9001
MyScenario.node[1..2].udpApp[0].destPort = 9001
MyScenario.node[1..2].udpApp[0].messageLength = 100B
MyScenario.node[1..2].udpApp[0].startTime = uniform(0s, 5s)
MyScenario.node[1..2].udpApp[0].sendInterval = 5s #uniform(0.01s, 0.05s)
#atttack
MyScenario.node[1..2].udpApp[1].typename = "UDPBasicApp"
#MyScenario.node[1..2].udpApp[1].destAddresses = "224.0.0.1"
MyScenario.node[1..2].udpApp[1].multicastInterface = "wlan0"
MyScenario.node[1..2].udpApp[1].joinLocalMulticastGroups = true
# MyScenario.node[1..2].udpApp[1].localPort = 9001
MyScenario.node[1..2].udpApp[1].destAddresses = "node[0]"
MyScenario.node[1..2].udpApp[1].destPort = 9001
MyScenario.node[1..2].udpApp[1].messageLength = 100B
MyScenario.node[1..2].udpApp[1].startTime = 15s #uniform(0s, 5s)
MyScenario.node[1..2].udpApp[1].stopTime = 18s
MyScenario.node[1..2].udpApp[1].sendInterval = 0.01s #uniform(0.01s, 0.05s)
MyScenario.node[1..2].udpApp[1].packetName = "attack"
Any help will be very appreciated to help me to move forward in my project

Postfix server stopped sending external email

We have a postfix server running on MAC. Sometime yesterday our server stopped sending external email. We can send and receive internally, and we can receive from external. When we sent emails to other domains, though, they just disappear...
We've been working on this all day with no luck... Anyone have any thoughts?
Thanks!
--Charles
Here is our postconf -n
biff = no
command_directory = /usr/sbin
config_directory = /Library/Server/Mail/Config/postfix
content_filter =
daemon_directory = /usr/libexec/postfix
data_directory = /Library/Server/Mail/Data/mta
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin xxgdb $daemon_directory/$process_name $process_id & sleep 5
dovecot_destination_recipient_limit = 1
enable_server_options = yes
header_checks =
html_directory = /usr/share/doc/postfix/html
imap_submit_cred_file = /Library/Server/Mail/Config/postfix/submit.cred
inet_interfaces = all
inet_protocols = all
local_recipient_maps =
mail_owner = _postfix
mailbox_size_limit = 0
mailbox_transport = dovecot
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
message_size_limit = 20971520
mydestination =
mydomain = ourdomain.com
mydomain_fallback = localhost
myhostname = relay.ourdomain.com
mynetworks = 127.0.0.0/8 192.168.0.0/16 [::1]/128 [2001:240:587::]/64
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases
queue_directory = /Library/Server/Mail/Data/spool
readme_directory = /usr/share/doc/postfix
recipient_canonical_maps = hash:/Library/Server/Mail/Config/postfix/system_user_maps
recipient_delimiter = +
relayhost =
sample_directory = /usr/share/doc/postfix/examples
sendmail_path = /usr/sbin/sendmail
setgid_group = _postdrop
smtp_sasl_auth_enable = no
smtp_sasl_password_maps =
smtpd_client_restrictions = permit_mynetworks permit_sasl_authenticated permit
smtpd_enforce_tls = no
smtpd_helo_required = no
smtpd_helo_restrictions =
smtpd_pw_server_security_options = cram-md5,digest-md5,login,plain
smtpd_recipient_limit = 1000
smtpd_recipient_restrictions = permit_sasl_authenticated permit_mynetworks reject_unauth_destination permit
smtpd_sasl_auth_enable = yes
smtpd_tls_CAfile = /etc/certificates/relay.ourdomain.com.028E0388CA5957E50A13248BAD1711F41C84F596.chain.pem
smtpd_tls_cert_file = /etc/certificates/relay.ourdomain.com.028E0388CA5957E50A13248BAD1711F41C84F596.cert.pem
smtpd_tls_ciphers = medium
smtpd_tls_exclude_ciphers = SSLv2, aNULL, ADH, eNULL
smtpd_tls_key_file = /etc/certificates/relay.ourdomain.com.028E0388CA5957E50A13248BAD1711F41C84F596.key.pem
smtpd_use_pw_server = yes
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
unknown_local_recipient_reject_code = 550
use_sacl_cache = yes
virtual_alias_domains = $virtual_alias_maps hash:/Library/Server/Mail/Config/postfix/virtual_domains
virtual_alias_maps = $virtual_maps hash:/Library/Server/Mail/Config/postfix/virtual_users
postconf: warning: /Library/Server/Mail/Config/postfix//main.cf: unused parameter: default_destination_recipient_limit:=1000
relay:~ localadmin$
Looks like the issue was being caused by a typo...
I kept getting the error:
unused parameter: default_destination_recipient_limit
Upon looking at the master.cf file, I found that it had:
default_destination_recipient_limit: = 1000
Note the colon in that line. Fixed an the issue has gone away.

connecting new kannel box to opensmppbox

i have been trying to connect a new box (17.x.x.x)which i just installed kannel on it. i already have a running kannel on another box (19.x.x.x) which can send sms and recieve. i installed opensmppbox on the 19.x.x.x . when i start opensmppbox it shows waiting for incomming connections. then when i start kannel on the 17.x.x.x it connects to the smsbox but gives an error connecting to the opensmppbox. i have spend too ling a time on this.
how can i solve this problem. here is my kannel.conf for the 17.x.x.x
# Core
group = core
admin-port=9000
wapbox-port=9001
smsbox-port=9002
admin-password=Wass
status-password=Wing
dlr-storage=mysql
log-file="/var/log/kannel/bearerbox.log"
log-level=0
access-log="/var/log/kannel/access.log"
access-log-clean=true
access-log-format="%t %l [SMSC:%i] [SVC:%n] [ACT:%A] [BINF:%B] [FID:%F][from:%p] [to:%P] [flags:%m:%c:%M:%C:%d] [msg:%L:%b] [udh:%U:%u]"
box-allow-ip="*.*.*.*"
unified-prefix="0234,+234,00234"
#######################################
# WAPBOX box
group = wapbox
bearerbox-host = 127.0.0.1
log-file = "/var/log/kannel/wapbox.log"
#######################################
#SMSC group - For 38276
group = smsc
smsc = smpp
smsc-id = smppbox
host = 192.101.17.30
port = 2775
transceiver-mode = true
smsc-username = "hot"
smsc-password = "kkkk"
interface-version = 34
system-type =
my-number=38260
msg-id-type = 0x03
alt-charset = GSM
#denied-smsc-id =
#source-addr-ton = 0
#source-addr-npi = 0
#dest-addr-ton = 0
#dest-addr-npi = 0
allowed-prefix-regex = ^\+?(0|234)((8[01]2)|(808)|(7[01]8))
#######################################
# SMSBOX
group = smsbox
bearerbox-host = localhost
smsbox-id = vsmsc
sendsms-port = 9009
sendsms-url = "/cgi-bin/sendsms"
global-sender = cingular
reply-couldnotfetch = "Could not temporarily get content...please try again"
sendsms-chars = "0123456789 +-"
http-request-retry = 1
reply-emptymessage = ""
http-queue-delay = 30
max-pending-requests = 1000
log-file = "/var/log/kannel/smsbox.log"
log-level = 0
access-log = "/var/log/kannel/smsbox-access.log"
#######################################
# DATABASE
group = mysql-connection
id=mydlr
host=localhost
username=root
password=Wind
database=inm
max-connections=1
group = dlr-db
id = mydlr
table = dlr
field-smsc = smsc
field-timestamp = ts
field-destination = destination
field-source = source
field-service = service
field-url = url
field-mask = mask
field-status = status
field-boxc-id = boxc
below is the opensmppbox.conf
#
group = core
dlr-storage = internal
group = opensmppbox
opensmppbox-id = smppbox
opensmppbox-port = 2775
bearerbox-host = localhost
bearerbox-port = 9000
log-level = 0
log-file = /var/log/kannel/opensmppbox/opensmppbox.log
our-system-id =
use-systemid-as-smsboxid = true
route-to-smsc =Singtel
smpp-logins = "/etc/kannel/smpplogins.txt"
#route-to-smsc = emitsms
group = mysql-connection
id = mydlr
host = localhost
username = root
password = Wing
database = inm
max-connections = 1
group = dlr-db
id = mydlr
table = dlr
field-smsc = smsc
field-timestamp = ts
field-destination = destination
field-source = source
field-service = service
field-url = url
field-mask = mask
field-status = status
field-boxc-id = boxcid
below is the smpplogins.txt
system-id-01 password-01 system-type-01
client-02 password-02 vma 127.0.0.1
client-03 password-03 vma *.*.*.*
hot cingul12 vma 17.x.x.x
in opensmppbox change bearerbox-port to smsbox-port of core group in kannel conf ie change 9000 to 9002 in opensmppbox conf

Resources